[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Questions about encode-time and decode-time
From: |
Pascal Quesseveur |
Subject: |
Re: Questions about encode-time and decode-time |
Date: |
Thu, 25 Mar 2021 08:51:03 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (windows-nt) |
>"EZ" == Eli Zaretskii <eliz@gnu.org> writes:
EZ> Thanks. Please explain what you expected this to yield and why.
EZ> (Since EST-1 is not an existing time zone, I cannot myself guess
EZ> the answer to that question.)
Hi Elli, Thank you for the time spent answering me. I must admit that
I don't know much about timezones. I simply tried to understand what
was happening following a time error in the decoding of a Icalendar
appointment. According to what I understand the data of the VTIMEZONE
block is decoded into a string of the type
"STD-01:00DST-02:00,M3.5.0/02:00:00,M10.5.0/03:00:00" and associated
with the TZID. Then this string is used in encode-time operations.
As you told me those strings weren't handled properly on Windows, I
tested with a simple ID. Now I know I should have used CET but I am
suprised by the result of:
(decode-time (encode-time (list 0 30 9 14 3 2021 nil -1 "CET")))
--> (0 30 10 14 3 2021 0 nil 3600)
I thought I would get (0 30 9 14 3 2021 0 nil 3600). To get that
value I have to call:
(decode-time (encode-time (list 0 30 9 14 3 2021 nil -1 "CET")) "CET")
The docstring says: The optional ZONE is omitted or nil for Emacs
local time, ... So what is the Emacs local time?
--
Pascal Quesseveur
pquessev@gmail.com
- Questions about encode-time and decode-time, Pascal Quesseveur, 2021/03/23
- Re: Questions about encode-time and decode-time, Pascal Quesseveur, 2021/03/23
- Re: Questions about encode-time and decode-time, Eli Zaretskii, 2021/03/23
- Re: Questions about encode-time and decode-time, Pascal Quesseveur, 2021/03/24
- Re: Questions about encode-time and decode-time, Eli Zaretskii, 2021/03/24
- Re: Questions about encode-time and decode-time, Pascal Quesseveur, 2021/03/24
- Re: Questions about encode-time and decode-time, Eli Zaretskii, 2021/03/24
- Re: Questions about encode-time and decode-time,
Pascal Quesseveur <=
- Re: Questions about encode-time and decode-time, Eli Zaretskii, 2021/03/25
- Re: Questions about encode-time and decode-time, Pascal Quesseveur, 2021/03/25
- Re: Questions about encode-time and decode-time, Eli Zaretskii, 2021/03/25
- Re: Questions about encode-time and decode-time, Pascal Quesseveur, 2021/03/25