From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UAhFErXB6GPIjwAAbAwnHQ (envelope-from ) for ; Sun, 12 Feb 2023 11:38:45 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eKUHErXB6GMwCQEAauVa8A (envelope-from ) for ; Sun, 12 Feb 2023 11:38:45 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E678B5A9B for ; Sun, 12 Feb 2023 11:38:44 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pR9kG-0001Qh-W3; Sun, 12 Feb 2023 05:38:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pR9kF-0001QL-E6 for emacs-orgmode@gnu.org; Sun, 12 Feb 2023 05:38:07 -0500 Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pR9kD-0000gt-4n for emacs-orgmode@gnu.org; Sun, 12 Feb 2023 05:38:07 -0500 Received: from localhost ([::ffff:102.87.28.92]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000103955.0000000063E8C170.00001425; Sun, 12 Feb 2023 03:37:35 -0700 Date: Sun, 12 Feb 2023 13:32:21 +0300 From: Jean Louis To: Max Nikulin Cc: 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) Message-ID: Mail-Followup-To: Max Nikulin , emacs-orgmode@gnu.org References: <87lelce6iu.fsf@localhost> <87357i9959.fsf@localhost> <877cwse95m.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676198325; a=rsa-sha256; cv=none; b=hkNRIVHdx4Ei3EPX5MCngLcDI9lIgB6yTe9DY+Q597IgHlNMxwbVen4suvjSg3erw1xkg7 gS78VCnedEO0lpAZtr8HLK1DzLkcqKU4QzmaH/Ut4YDqQB4dHKhaA31ZrrYc85IEXWgaHJ DpgR638rpfkBa9XyZxb8ojfBkuloelPz3MuRBW2YvoLooYKwN6ccSMkHRG9areXNxyyKIb CtTfMDbhs2iy1R1SixpYGZK7Hw5QsAqILIPVaj0k/J7wbO/BbzYuGB+Lza0Ec3Jxb3XfVr f33u3OVqBeHlk8LSr5JRC9YKsyLjKt4U3FnDIsUwEWjZVyYuzryUn5AN8WMzCw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676198325; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=geT77faeBKTW/EkHInhayWASvELbtUXrDRNtez9exVk=; b=C0GBA/6wn/4D3tl0GLtO0m1Sxob5+YfDZyu0yUUw+EoxrwpVYWz4Mz8pDDsQ0IeNrLvPpR qsA7rW2Go6Jd3auCaDEau/rvV+VONzX5tudz6I3TO2Z3BnYcEzDdXoBPRZ8H1MZmARxq07 HQpj186bRgANJsrCdpE+uUcSQamcdzWTCWj10Qje60BQk4otV/PvjtrwYAJqQpYjwtNKBZ 6sT37wrW7g0Aijs/SLkM7DWNzIh+ysPlyIohc3vulglIef0X+AbVkdiYBuSM9WIt/4q1z7 AlBZkmkKQautyt8ugnjm/wXj69o65zrmthO1+zKEePChvgnElEeaChm32WQTLw== X-Migadu-Queue-Id: E678B5A9B Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.22 X-Spam-Score: -3.22 X-TUID: qX60JbcU6fBz * Max Nikulin [2023-02-11 07:47]: > On 10/02/2023 10:29, Jean Louis wrote: > > 2030-02-09 12:00 -08 @UTC -- this time CANNOT be said to be "fixed > > UTC" > > I do not see any reason why obviously invalid timestamp draws so much > attention. > > Resolution may be rather concise: behavior is *undefined* since field values > are mutually inconsistent. Perhaps implementation may prefer to treat it as > 2030-02-09T12:00:00-0800 discarding UTC as time zone specifier. `org-lint' > should issue a warning requesting a user action. Thank you! I have demonstrated that Etar application from F-Droid would disregard what is invalid and basically only enter valid time. Same for Google calendar, it would disregard invalid timestamp (even though not represented as above), and it would enter only valid one. PostgreSQL will "silently" ignore what does not belong to it. One can search for "silent" here: https://www.postgresql.org/docs/current/datatype-datetime.html > Could you explain what is wrong with the following (without timezone)? > > 2030-02-09 12:00 -0800 > > I consider it as an unambiguous equivalent of 2030-02-09T20:00:00Z that is a > UTC timestamp. That is not same case as Ihor, when he designated it as 2030-02-09 12:00 -0800 @UTC because there are no offsets @UTC time zone. In this different case you wish to say that it is: time of 2030-02-09 12:00 -0800 whereby -0800 is UTC offset from floating time 2030-02-09 12:00, and one can derive UTC time. That is totally alright as representation of time. That is how past timestamps are represented in local time. Why not -- you can use it for future. I find it less useful for exchange purposes, almost useless, but you can do. Because if you store time as UTC, you can always see local time anywhere in the world. But if programmers wish to do that to Org, okay fine. It is different time type representation, that does not exist in ISO 8601, but why not, you can include it in Org. You just be sure that you put a "tag" or such representation that users will know what is it, even from plain text. > The format with explicit offset may be convenient for a person > living in an area that *likely* will have -08:00 offset and who > would like to watch some astronomical event such as lunar eclipse > and who had a plan to connect to some telescope on the opposite side > of the globe. Event time will not change if local time changed. Both > variants 2030-02-09T12:00:00-0800 and 2030-02-09T20:00:00Z may be > presented as "2030-02-09 12:00" to users. And now you speak of presentation. But then why store it with 2030-02-09T12:00:00-0800 when you can store it as 2030-02-09T20:00:00Z and have representation be same "2030-02-09 12:00" to users. So that is only addition to programmer. Remember that not even databases store the time like that. It is either UTC time, or date, time, and some time zone stored separately. > If timezone offset is changed both variants will converted to > "13:00" or "11:00" depending on sign of change. Correct. I understand you want to say that representation of time for that UTC time zone will be modified depnding of change, and that is correct. > So the format with offset is human friendly because it gives a hint > concerning *probable* value of local time still remaining *precise* > in respect to UTC. This representation of time is human friendly: 2030-02-09 12:00 -0800 and that is the way how I daily see my timestamps, like this: 2023-02-12 12:59:52.839773+03 which does not differ much from that one. However, my timestamp is only represented with +03 UTC offset. It is not stored with UTC offset. Storing values is not equal to representing values. - In other software values are not stored as "UTC time that has offset" - It is stored as "UTC time" - Offset is calculated from time zone and represented to user. Of course you need not follow what other software does. Though I think you need rather exact designation for users to unmistakably can understand what you mean with it: - Right now when I press C-c . I get: <2023-02-12 Sun> - C-u C-c . and I get <2023-02-12 Sun 13:03> - Then I can think you (developers) will invent something like: <2023-02-12 Sun 13:03 @Europe/Berlin> (whereby one has to avoid invalid time stamps), which is UTC time: 2023-02-12 12:03:00 - Then I can think you would invent time stamp which you proposed, something like: <2023-02-12 12:00 -08:00> which in this case cannot have day representation, as one cannot know which day is that, right? And in this case that timestamp would mean it is 20:00 o'clock UTC time. And which can be replaced with <2023-02-12 20:00 @UTC> I am just not sure if that will be enough human friendly to say: <2023-02-12 12:00 -08:00> to people, as there is no designation that it is UTC time, and one cannot use "@UTC" as that would be wrong. Maybe designation is not necessary? When we consider how good calendars work, they will always ask user for the time zone. There is settings. And then if you write that event is on Sunday 20 o'clock, it will be considered 20 o'clock at that time zone. When you send it, it will be maybe converted to UTC time, but maybe not, maybe with time zone designation. In any case remote user will either get UTC time or date, time with time zone. Getting time representation with offset, to calculate UTC time seem redundant. But why not, it is possible. Will you do it, practically implement it? > I find the following as acceptable, but confusing to some degree: > > 2030-02-09 12:00 -08 > > just because "-08" is currently used in TZ database as time zone > abbreviation (a string similar to "BST"), not as offset that is represented > in wide spread formats as -0800 or -08:00. Unfortunately the latter causes > ambiguity in the context of Org. That is why is better not to use TZ time zone abbreviation for future times! For past times, is somehow okay. For future no. Let me consult the database. #+BEGIN_SRC sql :engine postgresql :exports results :host localhost :cmdline :database rcdbusiness :dbuser maddox SELECT name, abbrev, utc_offset, is_dst FROM pg_timezone_names where abbrev = '-08'; #+END_SRC #+RESULTS: | name | abbrev | utc_offset | is_dst | |------------------------+--------+------------+--------| | Etc/GMT+8 | -08 | -08:00:00 | f | | Pacific/Pitcairn | -08 | -08:00:00 | f | | posix/Etc/GMT+8 | -08 | -08:00:00 | f | | posix/Pacific/Pitcairn | -08 | -08:00:00 | f | In your example, you should not use time zone abbreviations to say that it is UTC time with offset. Better use accurate offset (which is not UTC offset, as that is changeable). This is better if you really wish to designate the time with offset which represents UTC time: 2030-02-09 12:00 -08:00 Because you are rounding for no good reason! You have introduced new type of time storage, which is time with offset representing UTC time. While UTC offsets are mostly rounded, you are introducing not the UTC offset, but "offset". That means that following is also just fine: 2030-02-09 11:47 -08:12 Which is not common. But you insist on using time with offset, that represents UTC time, however, then you should not be using "UTC offsets" for such representations, but leave to users what "offset" to add or deduce, for UTC calculation. I am against such storage, and representation, but either: - as UTC time, without offset - or as date, time, time zone, as UTC offset can be calculated in future time points But we can see that Org is different case, it is textual, not database. However, this time: <2023-02-12 13:29> was always considered floating, and then by changing anything it can become [2023-02-13 Mon 13:29], the day is "added" automatically. So one needs some "tag" for time represented as UTC time but with offset, like [2023-02-13 13:29 @TO-UTC -08:00] it cannot be "@UTC" as that is time zone. You have to invent how to represent it, that is unmistakable to other representations. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/