help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Questions about encode-time and decode-time


From: Pascal Quesseveur
Subject: Questions about encode-time and decode-time
Date: Tue, 23 Mar 2021 18:11:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (windows-nt)

Hello,

Due to an error in decoding a date in a Vcalendar apointment, I tried
to understand the coding and decoding of time values. I ended up with
these tests:

(decode-time (encode-time
  (list 0 30 9 13 3 2021 nil -1 
"STD-01:00DST-02:00,M3.5.0/02:00:00,M10.5.0/03:00:00")))
-> (0 30 9 13 3 2021 3 nil 3600)
(decode-time (encode-time
  (list 0 30 9 14 3 2021 nil -1 
"STD-01:00DST-02:00,M3.5.0/02:00:00,M10.5.0/03:00:00")))
-> (0 30 8 14 3 2021 5 nil 3600)
(decode-time (encode-time
  (list 0 30 9 27 3 2021 nil -1 
"STD-01:00DST-02:00,M3.5.0/02:00:00,M10.5.0/03:00:00")))
-> (0 30 8 27 3 2021 6 nil 3600)
(decode-time (encode-time
  (list 0 30 9 28 3 2021 nil -1 
"STD-01:00DST-02:00,M3.5.0/02:00:00,M10.5.0/03:00:00")))
-> (0 30 9 28 3 2021 0 t 7200)

I don't understand why I get 8:30 from march 14 to 27.

My config is Emacs 27.1 (x86_64-w64-mingw32) on a french Windows 10
system. I checked with emacs -Q.

-- 
Pascal Quesseveur
pquessev@gmail.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]