[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problems with GNU date and missing timezone handling on several debian s
From: |
Joel N. Weber II |
Subject: |
problems with GNU date and missing timezone handling on several debian systems |
Date: |
Mon, 11 Jul 2005 17:19:02 -0400 |
In discovering that PDT is not the right way to spell the timezone in
the TZ environment variable, I discovered that on a Debian Sarge
system with GNU date, bogus timezone names get copied to the output,
with the time printed in GMT, leading one to a false sense that one
has entered a correct timezone name:
sell-me-down-the-river:~$ date
Mon Jul 11 17:03:09 EDT 2005
sell-me-down-the-river:~$ TZ=HST date
Mon Jul 11 11:03:17 HST 2005
sell-me-down-the-river:~$ TZ=PDT date
Mon Jul 11 21:03:24 PDT 2005
sell-me-down-the-river:~$ TZ=completelybogusnonexistanttimezone date
Mon Jul 11 21:03:36 completelybogusnonexistanttimezone 2005
sell-me-down-the-river:~$
By contrast, NetBSD's date tells you that you're in GMT when doing this:
xanthine:~$ date
Mon Jul 11 17:13:27 EDT 2005
xanthine:~$ TZ=HST date
Mon Jul 11 11:13:31 HST 2005
xanthine:~$ TZ=PDT date
Mon Jul 11 21:13:36 GMT 2005
xanthine:~$ TZ=completelybogusnonexistanttimezone date
Mon Jul 11 21:13:49 GMT 2005
xanthine:~$
This might well be more of a glibc issue than a date issue, though;
I'm not really sure.
I also find it rather confusing that date will in some circumstances
print PDT as the timezone, leading me to suspect that PDT is a valid
value for the TZ variable when it apparently actually isn't:
sell-me-down-the-river:~$ TZ=PST8PDT date
Mon Jul 11 14:16:25 PDT 2005
sell-me-down-the-river:~$
- problems with GNU date and missing timezone handling on several debian systems,
Joel N. Weber II <=