[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
date timezone question
From: |
P |
Subject: |
date timezone question |
Date: |
Wed, 31 Mar 2004 16:27:09 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124 |
Q1. Why is there a difference in the parsing of $TZ
and --date ... timezone ?
Q2. Why is a warning not printed when an invalid $TZ is set?
Details:
I needed to organise a meeting for 09:00 in San José
and so to figure out the time here (Irish Summer Time) I did:
$ date --date "09:00 PST"
Wed Mar 31 18:00:00 IST 2004
Cool
right, now I tried to see what time it was there now like:
$ TZ=PST date
Wed Mar 31 15:19:20 PST 2004
that's wrong so I tried
$ TZ=crap date
Wed Mar 31 15:19:20 crap 2004
interesting, crap is treated as UTC?
using tzselect I found the right one to use
$ TZ=America/Los_Angeles date
Wed Mar 31 07:21:51 PST 2004
There is some pertinent info in the docs:
Time zone items
===============
A "time zone item" specifies an international time zone, indicated
by a small set of letters, e.g., `UTC' or `Z' for Coordinated
Universal Time. Any included periods are ignored. By following a
non-daylight-saving time zone by the string `DST' in a separate word
(that is, separated by some white space), the corresponding daylight
saving time zone may be specified.
Time zone items other than `UTC' and `Z' are obsolescent and are not
recommended, because they are ambiguous; for example, `EST' has a
different meaning in Australia than in the United States. Instead,
it's better to use unambiguous numeric time zone corrections like
`-0500', as described in the previous section.
cheers,
Pádraig.
- date timezone question,
P <=