Emacs: Use local time (with timezone) in timestamps in Emacs >= 27.
This commit is contained in:
parent
2d576fec10
commit
ab2cc5c2e3
|
@ -1,6 +1,6 @@
|
|||
;;; common.el --- Common settings for text files. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2019-12-26T07:41:24+00:00>
|
||||
;; Time-stamp: <2019-12-26T19:50:08+0100>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -107,9 +107,12 @@
|
|||
;; The string Time-stamp: <> in the first 8 lines of the file will be updated
|
||||
;; with the current timestamp.
|
||||
(use-package time-stamp
|
||||
:custom
|
||||
(time-stamp-format "%:y-%02m-%02dT%02H:%02M:%02S+00:00")
|
||||
(time-stamp-time-zone t) ; Set to UTC until ISO 8601 is supported.
|
||||
:config
|
||||
(if (>= emacs-major-version 27)
|
||||
(setq time-stamp-format "%Y-%02m-%02dT%02H:%02M:%02S%5z")
|
||||
(progn
|
||||
(setq time-stamp-format "%Y-%02m-%02dT%02H:%02M:%02S+00:00")
|
||||
(setq time-stamp-time-zone t))) ; Set to UTC since ISO 8601 is not supported.
|
||||
|
||||
:hook
|
||||
(before-save . time-stamp)
|
||||
|
|
Loading…
Reference in New Issue
Block a user