all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, 55635-done@debbugs.gnu.org,
	Maxim Nikulin <m.a.nikulin@gmail.com>
Subject: bug#55635: `make-decoded-time' incorrectly sets DST to nil, it should be -1 (guess)
Date: Sat, 28 May 2022 10:25:51 -0700	[thread overview]
Message-ID: <d2be51a2-fbce-82d7-a0d9-e02e05854383@cs.ucla.edu> (raw)
In-Reply-To: <83o7zhlht0.fsf@gnu.org>

On 5/28/22 09:53, Eli Zaretskii wrote:
> this situation already exists with time units anyway.  You can add
> an hour to some other time, but there's also a valid time stamp that
> expresses 1 hour past the epoch UTC, and their values are exactly
> identical.

Quite true for encoded times that count seconds. However, Max also has a 
point that decoded timestamps like (19 17 10 28 5 2022 6 t -25200) are 
problematic as relative times. Although their first six elements can be 
treated as either relative or absolute, their last three elements don't 
make much sense in relative times.

The recent change in the master branch that lets encode-time take 
six-element lists suggests that perhaps a better way to represent a 
relative decoded time would be as a 6-element list.

With that in mind, here are three suggestions.

1. decoded-time-dst should return -1, instead of nil, when given a 
6-element list, since nil means standard time and -1 means DST is unknown.

2. make-decoded-time should generate a six-element list unless given a 
DST or ZONE arg.

3. Document the above nicely. (This is the hardest part....)





  reply	other threads:[~2022-05-28 17:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 14:46 bug#55635: `make-decoded-time' incorrectly sets DST to nil, it should be -1 (guess) Maxim Nikulin
2022-05-26 12:13 ` Lars Ingebrigtsen
2022-05-27  2:11   ` Paul Eggert
2022-05-27 10:40     ` Lars Ingebrigtsen
2022-05-27 19:26       ` Paul Eggert
2022-05-28 10:41         ` Lars Ingebrigtsen
2022-05-28 16:31           ` Maxim Nikulin
2022-05-28 16:53             ` Eli Zaretskii
2022-05-28 17:25               ` Paul Eggert [this message]
2022-05-29 13:10                 ` Lars Ingebrigtsen
2022-05-29 22:04                   ` Paul Eggert
2022-05-31 12:25                     ` Maxim Nikulin
2022-06-13 21:30                       ` Paul Eggert
2022-06-14 15:57                         ` Maxim Nikulin

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

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

  git send-email \
    --in-reply-to=d2be51a2-fbce-82d7-a0d9-e02e05854383@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=55635-done@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=m.a.nikulin@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.