emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Jean Louis <bugs@gnu.support>
Cc: Ypo <ypuntot@gmail.com>, Org-mode <emacs-orgmode@gnu.org>
Subject: Re: [POLL] Proposed syntax for timestamps with time zone info (was: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda)
Date: Fri, 10 Feb 2023 10:48:15 +0000	[thread overview]
Message-ID: <878rh5eqz4.fsf@localhost> (raw)
In-Reply-To: <Y+W6Cb8jygn7Vkmn@protected.localdomain>

Jean Louis <bugs@gnu.support> writes:

> If you start adding in Org "fixed" time with UTC offset, that is a new
> type of timestamp, as it is not common in world.

It is how ISO8601 defines offsets.

> Here is suggestion:
> -------------------
>
> 1. Convert local time timestamp to UTC
> 2. Add 10024 hours
> 3. Provide timestamp in UTC

This will involve converting time, which is prone to errors. I still
think that sometimes it is more convenient for human to use familiar
time zone and fix the offset for future.

> Also look at this reference:
> https://icalendar.org/iCalendar-RFC-5545/3-3-5-date-time.html
>
> ,----
> | The form of date and time with UTC offset MUST NOT be used. For
> | example, the following is not valid for a DATE-TIME value:
> | 
> |  19980119T230000-0800       ;Invalid time format
> `----

> As with the above format, author would maybe think it is alright, but
> in general it is confusing. If author wish to specify UTC time, then
> no offset shall be used.

icalendar is _not_ the only time spec around. We can take it into
account, but I do not see any reason to follow it blindly.

Reading the linked RFC spec, I did note that the motivation for the time
format used in calendar is mainly scheduling meetings for people
residing in different time zones. I can see how the icalendar format is
reasonable within that specific purpose. I cannot see why Org timestamps
should be limited to meetings.

Note that the idea with (optionally) providing two time zones/offsets is
also coming from a time spec in
https://datatracker.ietf.org/doc/draft-ietf-sedate-datetime-extended/

Considering that the idea with "!" has been independently proposed
within the current discussion, I assess that allowing two time zones can
be useful.

Please remember that this format is optional. If it is not useful for
your use cases, feel free to specify a single time zone.

>> I would like to remind you that timestamps are not necessarily used for
>> meetings. And not always shared with other people.
>
> Ok, and I have asked you to provide practical examples.

And I did, in one of the previous replies - scientific experiment.
Another example can be solar eclipse.

> Timestamps for past time, like for logs, I always store as UTC time in
> database, with time zone (which does not mean that time zone is
> stored, but displayed in local time zone).

For Org, the aim is not to rely solely on programmatically calculating
time in current time zone. It should be possible to create timestamps
readable in raw text. UTC may be readable for some people, but not for
others. Of course, you can put UTC timestamps in your files, if you
prefer. But more general timestamp format should permit different use
cases.

> 1. [2024-02-04 12:00 @-08,America/Vancouver] you define that @-08 has
>    priority, OK fine, but how does user sees that? Only by reading
>    documentation?

Yes. Either way, the timestamp should follow some format defined
in documentation.

> 2. You wish to say it will be future time of 20:00 o'clock, but time
>    zone definition can change, so if it can change, why use time zone
>    definition?

To get notified about the change.

> 3. UTC offset is displayed for past, as such time is accurate, but if
>    you display it for future, be aware that it is wrong for reason
>    that you cannot know the UTC offset in future without time
>    zone. Just display UTC time. Offset is not relevant, it will be
>    displayed to every user in their local time anyway, once they get
>    UTC.

It may or may not be displayed. Because Org should be readable as plain
text.

> 4. Hypothetical example of clear timestamp for future:
>    [2024-02-04 12:00! @-08,America/Vancouver]
>    where the time would be stamped with "!" and that would mean that in the time zone, meeting is at 12 o'clock.
>    It would assume that UTC offset can change in future, but 12:00 clock would be authoritative time for future.

This is ambiguous. 12:00 which time zone? GTM+08? America/Vancouver?

>> > Maybe this way (hypothetically):
>> >
>> > [2024-02-04 12:00 @-08, America/Vancouver/UTC-FIXED]
>> >
>> > as that way you would give signal to program that you want UTC fixed
>> > time in future, and not 12:00 o'clock necessary.
>> 
>> I am sorry, but I don't understand what you mean by UTC-FIXED.
>
> You mentioned it, you wish to have offset and to remain UTC fixed.
>
> And UTC is not fixed, it is either UTC without offset, or time zone
> with UTC offset.
>
> But if you do wish, you have to make "tag" somehow, for computer
> program to know what you mean, "UTC-FIXED" is only hypothetical tag.

Sorry but I still don't understand.
For me, -08 is GMT+08 nautical time zone. Short form.
America/Vancouver is a time zone.
What is America/Vancouver/UTC-FIXED?

>> It is sometimes easier to define UTC time +offset instead of doing an
>> extra conversion in your head.
>
> I hope you understood the difference.
>
> Providing UTC time plus some offset is inconclusive. It is idea that
> is not aligned with what international community is doing.
>
> Provide UTC time.
>
> Or provide time zone plus UTC offset.
>
> Your idea as such is alright, but is individual, and it has to be
> coordinated with what other programs are doing. Otherwise it become
> confusing.
>
> Remember the reference on iCalendar, "not do do that". 
>
> iCalendar provides either UTC time, or date, time and time zone.

iCalendar is not the only source of truth. The suggested offsets are
what ISO8601 defines. iCalendar explicitly disregards the fixed offsets
for some iCalendar-specific reasons. It is iCalendar that is not being
aligned with more common standard.

>> > Then it becomes clear that it will be the UTC offset in future with
>> > assumed mentiond time zone.
>> >
>> > But if you mix UTC offset, plus the time zone for future, that makes
>> > little sense, unless you introduce some tags that timestamp is
>> > recognizable as using UTC time, or that it uses date/time and time
>> 
>> The problem being addressed with @+08,!Asia/Singapore is possible future
>> change in time zone.
>
> That problem is solved, if you use TZ database:
>
> - in case of change of time zone, the TZ database will provide future
>   adjustment, there may be new name of new time zone. 
>
> - in case of change of UTC offset, the TZ database in future will know
>   it. 

Your statement is true only when TZ database is guaranteed to be
up-to-date. It is not always the case. Consider opening an Org document
on machine with out-of-date TZ database.

> I will never miss the meeting provided program consults TZ database.

You will not. But I can see myself missing the meeting and assuming the
time "as usual".

> But if I have 2 timestamps, that is different situation.
>
> You need no UTC offset for future time representation.
>
> Also good to read:
> https://engineering.q42.nl/why-always-use-utc-is-bad-advice/
>
> Also good to read:
> https://swizec.com/blog/saving-time-in-utc-doesnt-work-and-offsets-arent-enough/

The second link illustrates exactly UTC offset + also time zone name.
Similar to what I proposed.

-- 
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	other threads:[~2023-02-10 10:48 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-04 21:38 [POLL] Proposed syntax for timestamps with time zone info (was: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda) Ypo
2023-02-05  3:12 ` Max Nikulin
2023-02-05  9:31 ` Jean Louis
2023-02-05 10:44 ` Ihor Radchenko
2023-02-05 12:12   ` Jean Louis
2023-02-05 13:01     ` ypuntot
2023-02-06 14:15       ` Ihor Radchenko
2023-02-07 21:38       ` Jean Louis
2023-02-06 14:10     ` Ihor Radchenko
2023-02-07 22:19       ` Jean Louis
2023-02-08 10:36         ` Ihor Radchenko
2023-02-10  3:29           ` Jean Louis
2023-02-10 10:48             ` Ihor Radchenko [this message]
2023-02-12  9:33               ` Jean Louis
2023-02-12 13:47                 ` tomas
2023-02-14  6:00                   ` Jean Louis
2023-02-14  9:41                     ` Heinz Tuechler
2023-02-14  9:45                       ` tomas
2023-02-14 11:42                         ` Max Nikulin
2023-02-14 15:59                           ` Jean Louis
2023-02-14 16:45                             ` Thomas S. Dye
2023-02-16 14:21                               ` Jean Louis
2023-02-14 16:57                             ` Max Nikulin
2023-02-14 10:45                       ` Jean Louis
2023-03-10 10:46                         ` Ihor Radchenko
2023-03-08 13:30                 ` Ihor Radchenko
2023-03-10  1:37                   ` Jean Louis
2023-02-11  4:44             ` Max Nikulin
2023-02-12 10:32               ` Jean Louis
2023-02-15 15:17                 ` Ihor Radchenko
2023-02-16 15:06                   ` Jean Louis
2023-03-10 10:51                     ` Ihor Radchenko
2023-03-15 14:42             ` Max Nikulin
  -- strict thread matches above, loose matches on Subject: below --
2023-02-12 13:27 Ypo
2023-02-04 18:59 ypuntot
2023-02-04 19:45 ` Jean Louis
2023-02-05 17:04 ` Max Nikulin
2023-02-07 21:46   ` Jean Louis
2023-01-17  3:55 [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda Daryl Manning
2023-01-17  8:22 ` Tim Cross
2023-01-17  9:15   ` Ihor Radchenko
2023-01-17  9:45     ` Tim Cross
2023-01-18  9:15       ` Ihor Radchenko
2023-01-18 11:43         ` Tim Cross
2023-01-18 12:02           ` Ihor Radchenko
2023-01-18 21:16             ` Tim Cross
2023-01-19  5:29               ` Jean Louis
2023-01-19  7:23                 ` Tim Cross
2023-01-19 14:32                   ` Jean Louis
2023-01-19 20:09                     ` Tim Cross
2023-01-19 23:02                       ` Thomas S. Dye
2023-01-19 23:51                         ` Tim Cross
2023-01-20  0:24                           ` Thomas S. Dye
2023-01-20  3:46                             ` Tim Cross
2023-01-20  6:14                               ` Thomas S. Dye
2023-01-27  6:06                                 ` Sterling Hooten
2023-01-27 11:09                                   ` Ihor Radchenko
2023-01-30 11:25                                     ` Greg Minshall
2023-01-31 11:48                                       ` [POLL] Proposed syntax for timestamps with time zone info (was: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda) Ihor Radchenko
2023-01-31 12:19                                         ` Daryl Manning
2023-01-31 12:41                                           ` Ihor Radchenko
     [not found]                                             ` <CAL9aZksf8AGF=dXg0KAtLPyu1ATt1fLpvdsjN6GMCuK2KRQ56w@mail.gmail.com>
2023-01-31 13:33                                               ` Ihor Radchenko
2023-01-31 13:22                                         ` Jean Louis
2023-01-31 13:46                                           ` Ihor Radchenko
2023-01-31 19:59                                             ` Jean Louis
2023-02-01 12:42                                               ` Ihor Radchenko
2023-02-01 15:28                                                 ` Jean Louis
2023-02-01 16:30                                                   ` Ihor Radchenko
2023-01-31 20:12                                             ` Jean Louis
2023-02-01  5:46                                               ` tomas
2023-02-01  7:29                                                 ` Jean Louis
2023-02-01  7:52                                                 ` Tim Cross
2023-02-01  8:32                                                   ` Jean Louis
2023-02-01  8:46                                                   ` Ihor Radchenko
2023-02-01  9:38                                                     ` Tim Cross
2023-02-01 10:15                                                       ` Ihor Radchenko
2023-02-01 14:53                                                         ` Jean Louis
2023-02-01 16:36                                                           ` Ihor Radchenko
2023-02-01 10:46                                                       ` Max Nikulin
2023-02-01 14:43                                                       ` Jean Louis
2023-02-01 16:45                                                         ` Ihor Radchenko
2023-02-02  3:05                                                           ` Max Nikulin
2023-02-02  8:59                                                             ` Ihor Radchenko
2023-02-01 14:38                                                     ` Jean Louis
2023-02-01 16:50                                                       ` Ihor Radchenko
2023-02-01  7:00                                               ` Thomas S. Dye
2023-02-01  7:41                                                 ` Jean Louis
2023-01-31 18:56                                         ` Greg Minshall
2023-02-01 12:48                                           ` Ihor Radchenko
2023-02-01 12:52                                             ` tomas
2023-02-02  4:49                                               ` Greg Minshall
2023-01-31 20:41                                         ` Tim Cross
2023-01-31 23:50                                         ` Samuel Wales
2023-02-01 13:01                                           ` Ihor Radchenko
2023-02-04 22:33                                             ` Samuel Wales
2023-02-04 22:49                                               ` Samuel Wales
2023-02-05 10:38                                               ` Ihor Radchenko
2023-02-01 11:56                                         ` Christian Moe
2023-02-01 12:20                                           ` Ihor Radchenko
2023-02-01 15:41                                             ` Jean Louis
2023-02-02  8:38                                               ` Ihor Radchenko
2023-02-03 11:31                                                 ` Jean Louis
2023-02-04 10:58                                                   ` Ihor Radchenko
2023-02-04 19:32                                                     ` Jean Louis
2023-02-05  9:14                                                       ` Ihor Radchenko
2023-02-02  3:46                                         ` Timothy
2023-02-02  9:12                                           ` Ihor Radchenko
2023-02-02  9:12                                             ` Timothy
2023-02-02  9:20                                               ` Ihor Radchenko
2023-02-02  9:27                                                 ` Timothy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rh5eqz4.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=bugs@gnu.support \
    --cc=emacs-orgmode@gnu.org \
    --cc=ypuntot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).