Bug 4028 - date output is surprising when TZ is set to an unknown locale
Summary: date output is surprising when TZ is set to an unknown locale
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
Depends on:
Reported: 2007-02-12 09:35 UTC by Pierre Habouzit
Modified: 2015-01-29 13:35 UTC (History)
1 user (show)

See Also:
Last reconfirmed:
fweimer: security-

proposed patch (795 bytes, patch)
2007-02-12 09:38 UTC, Pierre Habouzit
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Habouzit 2007-02-12 09:35:28 UTC
for example:

$ TZ=IDIOT date
Wed Jan 19 19:54:58 IDIOT 2000

here it's harmless. but for 
$ TZ=PST date
Mon Feb 12 09:34:02 PST 2007

it's not ast the correct value is:
$ TZ=PST8DST date
Mon Feb 12 01:34:14 PST 2007

Attached is a patch that do not reuse TZ value if no offset was provided, and 
that instead clearly state that UTC was the chosen timezone to display the 
Comment 1 Pierre Habouzit 2007-02-12 09:38:32 UTC
Created attachment 1548 [details]
proposed patch
Comment 2 Ulrich Drepper 2007-02-12 15:00:40 UTC
The existing behavior is as valid as any other.  Any change will disrupt things,
though.  No change.
Comment 3 Aurelien Jarno 2009-05-10 13:12:39 UTC
This bug has been solved in version 2.10, despite the WONTFIX tag.