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: Wed, 08 Mar 2023 13:30:23 +0000	[thread overview]
Message-ID: <87fsafe5g0.fsf@localhost> (raw)
In-Reply-To: <Y+iydEcCgTHvxsDE@protected.localdomain>

Jean Louis <bugs@gnu.support> writes:

>> > 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.
>
> Your answer is not related any more to @UTC time you were mentioning
> as now you are using "familiar time zone". I said, there is no offset
> representation with UTC time but +00. But it can be with other time
> zones.
>
> However, when you say "fix the offset for future" that does not
> work. If you do specify time zone, you are fixing it by time zone, and
> not by UTC offset, because it is less likely that the time zone
> definition changes, but UTC offset can change easier.
>
> The UTC offset is property of the time zone. The future time zone
> definition will know what is it's UTC offset.

UTC offset is indeed a property of the time zone.
However, UTC offset may be a subject of change in some time zones.
I am referring to "fixed" offsets to be specified by users and will
never change. These offsets are convenient to protect timestamp from
regulatory changes in time zones. Effectively, they are simply another,
sometimes convenient, way to represent UTC time.

Consider that you need to put a timestamp exactly 1 year from now, even
if time zone rules change. You are in +04 time zone at
[2023-03-08 14:00 @Asia/Istanbul].

You can write [2024-03-08 11:00 @Z] or you can write
[2024-03-08 14:00 @+03]. The latter is nothing but former, written
without a need to mentally convert back to UTC from your current wall
clock.

> You can introduce something new in Org and say "This is fixed UTC
> offset in time zone @ABC" but that way you are confusing yourself and
> future programmer and users, as it does not comply to already accepted
> international standards.
>
> iCalendar proposes different way of representation of time in future,haw
> that is, it could be UTC time in future, or it could be date, time and
> time zone. Using UTC offset for future is redundant, as in present
> time when you are writing future time stamp, you cannot know the
> future UTC offset.

iCalendar provides just two options: time zone name and UTC. It is ok
when the timestamps are written programmatically, but not ok when the
format should be writable by humans manually. I do not see why we should
force the users to convert to UTC manually in the above scenario.

>> 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.
>
> How about finding reasons why iCalendar specifies it that way?
>
> And then deciding if those reasons, not specification literally,
> should be followed?

Feel free to share the underlying logic if you are aware about it.
 
>> 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/
>
> ...
> Conclusion is that your reference is only partially relevant, as you
> may use it as guide for past timestamps, but not as guide for future
> time representation.

The cited document explicitly talks about timestamps in future. See 3.4.
Inconsistent time-offset/Time-Zone Information

> In my opinion people should be given the extended timestamp function
> in Org where they may choose the time zone.
>
> - no C-u prefix, interactive selection: <2023-02-12 Sun>
>
> - with C-u prefix, interactive, with time: <2023-02-12 Sun 11:09>
>
> - with double, C-u C-u, prefix, non-interactive with time: <2023-02-12 Sun 11:10>
>
> - but then I do not know what with 3 times C-u, some of those prefixes
>   could be used to let user choose the time zone

Sure, though I had a slightly different interface in mind. In any case,
it is too early to talk about interfaces. Let's finalize the syntax
first.

>> > 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?
>
> The sign "!" is telling "use time, not offset as authoritative". I do
> not say you should implement it this way, but I am saying it is wrong
> putting both the time and offset for future time, while you will not
> know the future offset with certainty.

Ok. I see the problem you referred to. We should then better stick to
the TEC's proposal here:

┌────
│ [2022-11-12 12:00 @+07,Asia/Singapore]  # warn when mismatch
│ [2022-11-12 12:00 @+07,!Asia/Singapore] # use Asia/Singapore over +07
│ [2022-11-12 12:00 @!+07,Asia/Singapore] # use +07 over Asia/Singapore
└────

The first timestamp is an error when time zone rules change.
In the two other timestamps, the complementary time zone is a redundant
information that does not affect how the timestamp is interpreted and
simply aids the human eye. Optionally, users could enable extra checking
with Org warning about inconsistency for the two latter kinds of
timestamps as well.

> It is not good specifying something in Org program and not clearly
> giving it to user what is authoritative.

Sure. The first kind of timestamp is to be left to users to enter
manually, when they need to. Automatic timestamps are of the other two
kinds.

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


  parent reply	other threads:[~2023-03-08 13:30 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
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 [this message]
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=87fsafe5g0.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).