emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-ag


From: Ihor Radchenko
Subject: Re: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda
Date: Tue, 17 Jan 2023 19:49:25 +0000

Max Nikulin <manikulin@gmail.com> writes:

> https://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time
>    Falsehoods programmers believe about time

Some potentially relevant items:

- Each calendar date is followed by the next in sequence, without
  skipping.
- The standard library supports negative years and years above 10000
- The day of the month always advances contiguously from N to either N+1
  or 1, with no discontinuities.
- There are 60 seconds in every minute.

All the above statements are FALSE!

All the above statements may affect, in particular, timestamps with
repeaters. Repeaters like +1h or +1d may require querying the TZdb (time
API).

Some good news is that all the above edge cases would equally affect the
current Org's timestamp handling code. Yet, we have no bug reports in
this area. I'd even go further and say that we should not try hard to
make things 100% accurate: (1) it will waste a lot of resources; (2)
users dealing with these edge cases are likely already accustomed to
most programs not handling things correctly for their special time zone
situations.

That said, if there is an easy way to handle some of the edge cases, we
can implement them.

Important: if some edge cases with time zones are buggy in OS time API,
it is not Org's job to work around the problem - we should rather report
those bugs upstream. What we should check, however, is the Org's own
ad-hoc code that is dealing with timestamps. In particular, I am
concerned about the repeater intervals. We will need to carefully review
the code to avoid nasty surprises.

-- 
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]