GNU bug report logs - #14229
invalid TZ and /bin/date

Previous Next

Package: coreutils;

Reported by: Donald Berry <dberry <at> redhat.com>

Date: Thu, 18 Apr 2013 20:30:02 UTC

Severity: wishlist

Merged with 9614, 11748

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Donald Berry <dberry <at> redhat.com>
To: bug-coreutils <at> gnu.org
Subject: invalid TZ and /bin/date
Date: Thu, 18 Apr 2013 16:24:08 -0400 (EDT)
If an invalid TZ argument is passed to /bin/date, it silently fails but prints the UTC result:
[dberry <at> dberry ~]$ TZ=EDT date -d @0
Thu Jan  1 00:00:00 EDT 1970
[dberry <at> dberry ~]$ TZ=foo date -d @0
Thu Jan  1 00:00:00 foo 1970

It works correctly if using no argument or a valid argument:
[dberry <at> dberry ~]$ date -d @0
Wed Dec 31 19:00:00 EST 1969
[dberry <at> dberry ~]$ TZ=EST5EDT date -d @0
Wed Dec 31 19:00:00 EST 1969
[dberry <at> dberry ~]$ TZ=UTC date -d @0
Thu Jan  1 00:00:00 UTC 1970

[dberry <at> dberry ~]$ rpm -q coreutils
coreutils-8.4-19.el6.x86_64
[dberry <at> dberry ~]$ uname -a
Linux dberry.csb 2.6.32-279.19.1.el6.x86_64 #1 SMP Sat Nov 24 14:35:28 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
[dberry <at> dberry ~]$ cat /etc/redhat-release 
Red Hat Enterprise Linux Workstation release 6.3 (Santiago)
[dberry <at> dberry ~]$ date
Thu Apr 18 16:23:46 EDT 2013

Donald Berry, RHCE
Technical Account Manager
Red Hat Canada Ltd.
mobile: 647-338-6329





This bug report was last modified 6 years and 245 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.