[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Fwd: Debian GNU/Linux System Administrator's Manual section 16.1.2]



-------- Forwarded Message --------
From: Jacob L. Anawalt <janawalt@geckosoftware.com>
To: olly@lfix.co.uk
Subject: Debian GNU/Linux System Administrator's Manual section 16.1.2
Date: Wed, 25 Oct 2006 15:27:14 -0600

Hi,

I apologize if you've already been told about this, but I believe I can 
answer the question "but this seems wrong, since Pacific Standard Time 
should be 09:49???. What's happening???"

PST is not a valid POSIX.1 timezone string and cannot be interpreted so 
UTC is used, except that it has parsed far enough to replace UTC with 
PST from the TZ environment variable.

$ TZ=PST8 date --date="1998-11-01 17:49:59 UTC"
Sun Nov  1 09:49:59 PST 1998

$ TZ=:America/Los_Angeles date --date="1998-11-01 17:49:59 UTC"
Sun Nov  1 09:49:59 PST 1998

I learned this from man tzset.

It would be nice if the example were updated to show a correct POSIX.1 
timezone string and a zoneinfo example for "Pacific Standard Time" (I'm 
guessing the original author meant "US\Pacific".)

      $ date
      Sun Nov  1 19:49:38 EET 1998
      $ export TZ=PST8PDT,M4.1.0,M10.5.0
      $ date
      Sun Nov  1 09:49:59 PST 1998
      $ export TZ=:America/Los_Angeles
      $ date
      Sun Nov  1 09:51:20 PST 1998

-- 
Oliver Elphick                                          olly@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
                 ========================================
   Do you want to know God?   http://www.lfix.co.uk/knowing_god.html



Reply to: