GNU bug report logs -
#14146
[date command] Possible bug
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14146 in the body.
You can then email your comments to 14146 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#14146
; Package
coreutils
.
(Fri, 05 Apr 2013 15:17:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ivan Lombardi Borgia <ivan.lombardiborgia <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Fri, 05 Apr 2013 15:17:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Good morning,
for the 1th of April 2013 the command *date *has this interesting behaviour:
*
*
*$ date*
*Mon Apr 1 00:22:31 CEST 2013*
*$ date -d 'yesterday'*
*Sat Mar 30 23:22:38 CET 2013*
*
*
As you can read the date is 30 March instead of 31 the time 23:22 instead
of 00:22
I could verify that on:
- my personal machine running:
Linux dip03-ubu 3.2.0-40-generic-pae #64-Ubuntu
date --version: date (GNU coreutils) 8.13
- production servers running:
Linux ecomappsrv01 2.6.38-8-generic-pae #42-Ubuntu
date --version: date (GNU coreutils) 8.5
That doesn't happen for year 2012 and 2014.
It happens even using -u option.
It does not happen forcing date:
*date -d '2013-04-01 00:22:00 1 day ago' *
*Sun Mar 31 00:22:00 CET 2013*
*
*
If you need more information just ask and I will try to respond as soon as
possible.
Thank you, best regards.
Ivan Lombardi Borgia
[Message part 2 (text/html, inline)]
Added tag(s) notabug.
Request was from
Eric Blake <eblake <at> redhat.com>
to
control <at> debbugs.gnu.org
.
(Fri, 05 Apr 2013 15:28:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Eric Blake <eblake <at> redhat.com>
:
You have taken responsibility.
(Fri, 05 Apr 2013 15:28:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ivan Lombardi Borgia <ivan.lombardiborgia <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 05 Apr 2013 15:28:02 GMT)
Full text and
rfc822 format available.
Message #12 received at 14146-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tag 14146 notabug
thanks
On 04/05/2013 03:13 AM, Ivan Lombardi Borgia wrote:
> Good morning,
>
> for the 1th of April 2013 the command *date *has this interesting behaviour:
> *
> *
> *$ date*
> *Mon Apr 1 00:22:31 CEST 2013*
> *$ date -d 'yesterday'*
> *Sat Mar 30 23:22:38 CET 2013*
Did you notice the change in the time zone name from CEST to CET, based
on daylight savings?
> That doesn't happen for year 2012 and 2014.
Yeah, because daylight savings in your timezone falls on a different
date in those years.
> If you need more information just ask and I will try to respond as soon as
> possible.
You are hitting a typical usage problem. This is not a bug in date, but
in your usage of it; you are failing to account that "yesterday"
translates to "24 hours ago", but that 24 hours ago close to midnight
when crossing over a 23-hour day (thanks to daylight savings) can cross
2 calendar days.
For more information, including the tip to base relative date
computation on noon instead of close to midnight, see the FAQ:
https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#The-date-command-is-not-working-right_002e
As such, I'm closing this as not a bug, although you may feel free to
continue replying if you have further questions.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 04 May 2013 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 54 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.