Bug 491448 - Date quietly gives bogus results on unknown TZ values.
Date quietly gives bogus results on unknown TZ values.
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-20 22:24 EDT by Ralph Loader
Modified: 2009-04-18 04:36 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-18 04:36:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ralph Loader 2009-03-20 22:24:58 EDT
If you set the TZ environment variable to an unknown value, the date command takes this to mean GMT, but gives the user no indication that this has occurred.

An error message would be useful.

For example:

$ TZ=NZ date ; TZ=NZDT /bin/date
Sat Mar 21 15:19:31 NZDT 2009
Sat Mar 21 02:19:31 NZDT 2009
Comment 1 Ondrej Vasik 2009-03-21 16:47:39 EDT
Thanks for report. Already reported (found two cases) to upstream - one - the closest is http://lists.gnu.org/archive/html/bug-coreutils/2005-09/msg00105.html . Upstream maintainer stated the only place where such thing could be fixed is glibc. Not sure if already reported, will check on Monday and possibly reassign.
Comment 2 Ondrej Vasik 2009-04-02 10:44:28 EDT
Ok, nothing new discovered, I think there is no way how to handle this in date directly (at least no easy way), so reassigning to glibc...
Comment 3 Ulrich Drepper 2009-04-18 04:36:11 EDT
There is no way to signal error in these situations.  Just be careful when you do this.  For a reason there are scripts like tzselect which will produce the correct TZ setting.

Note You need to log in before you can comment on or make changes to this bug.