unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 48290@debbugs.gnu.org, "Евгений Михайлов" <lewwadoo@gmail.com>
Subject: bug#48290: 27.2; Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
Date: Sat, 08 May 2021 18:16:01 +0100	[thread overview]
Message-ID: <87a6p5kuy6.fsf@tcd.ie> (raw)
In-Reply-To: <83zgx588pg.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 08 May 2021 19:57:15 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Евгений Михайлов
>>  <lewwadoo@gmail.com>
>> Date: Sat, 8 May 2021 19:41:14 +0300
>
> Why do you think it's a bug.

I'm not Evgeny, but I think it's because the titular time spec includes
defaults set by decoded-time-set-defaults:

  (parse-time-string "11:30")
  ;; => (0 30 11 nil nil nil nil -1 nil)

  (decoded-time-set-defaults (parse-time-string "11:30"))
  ;; => (0 30 11 1 1 0 nil -1 nil)

Here's the context: https://emacs.stackexchange.com/q/64686/15748

> Year 0 is 1970 years before the epoch.

Ah, I missed the last part in the docstring of encode-time:

  Years before 1970 are not guaranteed to work.  On some systems,
  year values as low as 1901 do work.

So I don't know whether my suggested use of decoded-time-set-defaults is
wrong, or whether that function should set the year to 1970, as might be
assumed from its docstring.

Thanks,

-- 
Basil





      reply	other threads:[~2021-05-08 17:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08 16:41 bug#48290: 27.2; Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil)) Евгений Михайлов
2021-05-08 16:57 ` Eli Zaretskii
2021-05-08 17:16   ` Basil L. Contovounesios [this message]

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87a6p5kuy6.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=48290@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=lewwadoo@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.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).