Commit f3da3d1c authored by F. Jason Park's avatar F. Jason Park
Browse files

Fix faulty decoded-time adjustment in erc-stamp

* lisp/erc/erc-stamp.el (erc-stamp--lr-date-on-pre-modify): Remove
disruptive assertion for now.
(erc-stamp--time-as-day): Attempt to fix date being rewound by a whole
day when daylight saving time is in effect.  Do this by forcing the
`dst' slot of the `decoded-time' object to -1 and the `zone' to nil.
parent 166c8a98
Pipeline #28457 failed with stage
in 3 minutes and 48 seconds
......@@ -723,9 +723,6 @@ inserted is a date stamp."
'hash-table))
(erc-timestamp-last-inserted-left rendered)
erc-timestamp-format erc-away-timestamp-format)
;; FIXME delete once convinced adjustment correct.
(cl-assert (string= rendered
(erc-stamp--format-date-stamp aligned)))
(erc-add-timestamp))
(setq erc-timestamp-last-inserted-left rendered)))))
......@@ -833,7 +830,11 @@ left-sided stamps and date stamps inserted by this function."
(decoded (decode-time current-time erc-stamp--tz)))
(setf (decoded-time-second decoded) 0
(decoded-time-minute decoded) 0
(decoded-time-hour decoded) 0)
(decoded-time-hour decoded) 0
(decoded-time-dst decoded) -1
(decoded-time-weekday decoded) nil
(decoded-time-zone decoded)
(and erc-stamp--tz (car (current-time-zone nil erc-stamp--tz))))
(encode-time decoded))) ; may return an integer
(defun erc-format-timestamp (time format)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment