emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Observation of hysteresis in a GNU libc time conversion function


From: Ihor Radchenko
Subject: Re: Observation of hysteresis in a GNU libc time conversion function
Date: Thu, 19 Jan 2023 10:31:19 +0000

Max Nikulin <manikulin@gmail.com> writes:

>> Also, see
>> https://stackoverflow.com/questions/20104531/weird-mktime-logic-with-negative-seconds
>
> My expectation is that ±1 day (or month) should preserve local time 
> hours (e.g. 11:00 CET -> 11:00 CEST) if such moment of time exists. ±24 
> hours, ±24*60 minutes, ±24*3600 seconds across DST change should cause 
> appropriate shift of hours (e.g. 11:00 -> 12:00 is possible).
>
> Moreover "out of range" month day 0 is the only way to specify last 
> month day to get
>
>       Jan, 31 <- 1 month -> Feb, 28 (or 29) <- 1 month -> Mar, 31
>
> arithmetic.

Can we expect the same to work on Windows? If so, maybe we don't need
all the dancing around rounding off in `org-timestamp-change' and
instead simply use time API?

Re: 11:00 CET -> 11:00 CEST

Note that Org does not exactly offer much of convenience even without
considering TZ.

<2023-01-31 Thu +1m> -> <2023-03-03 Fri +1m>
And nobody really complained so far.
So, maybe we don't even need to care about these subtleties in practice?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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