emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#26081: closed (--date=STRING error that started mi


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#26081: closed (--date=STRING error that started midnight 3/12)
Date: Mon, 13 Mar 2017 12:18:02 +0000

Your message dated Mon, 13 Mar 2017 07:17:41 -0500
with message-id <address@hidden>
and subject line Re: bug#26081: --date=STRING error that started midnight 3/12
has caused the debbugs.gnu.org bug report #26081,
regarding --date=STRING error that started midnight 3/12
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
26081: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26081
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: --date=STRING error that started midnight 3/12 Date: Sun, 12 Mar 2017 22:09:14 -0700
Hello, I started getting an error with the following command:

$> date --date="02:05 tomorrow" +%s
date: invalid date `02:05 tomorrow'

It appears any time 2 in the morning causes the error. But everything else appears to work fine. This appears to have started after midnight on March 12 2017. May be something to do with daylight saving as it starts at 2AM? But the error continues today.

Date command details:

$> date --version
date (GNU coreutils) 8.13
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.


Regards,
Fevzi

--- End Message ---
--- Begin Message --- Subject: Re: bug#26081: --date=STRING error that started midnight 3/12 Date: Mon, 13 Mar 2017 07:17:41 -0500 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
tag 26081 notabug
thanks

On 03/13/2017 12:09 AM, Fevzi Karavelioglu wrote:
> Hello, I started getting an error with the following command:
> 
> $> date --date="02:05 tomorrow" +%s
> *date: invalid date `02:05 tomorrow'*
> 
> It appears any time 2 in the morning causes the error. But everything else
> appears to work fine. This appears to have started after midnight on March
> 12 2017. May be something to do with daylight saving as it starts at 2AM?

Everything to do with daylight savings.  In fact, it's a FAQ:
https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#The-date-command-is-not-working-right_002e

You're trying to start from a time that doesn't exist in your timezone,
due to it falling within the hour that was skipped.  Which is why we
recommend that date-relative commands be executed relative to noon
rather than midnight, since no (known) timezone makes their daylight
savings adjustments at noon, and even if the relative operations land at
11 am or 1 pm after crossing the boundary, you still end up in the right
relative day.


> *$> date --versiondate (GNU coreutils) 8.13Copyright (C) 2011 Free Software

Newer versions of coreutils come with a 'date --debug' option that give
you even more insight into failures, including your use case of
specifying a time that does not exist in your time zone.

I'm closing this as not a bug, but feel free to add further comments to
the thread.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]