[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems w/ date
From: |
Mike Dunphy |
Subject: |
Re: problems w/ date |
Date: |
Sat, 19 Mar 2005 13:04:44 -0800 |
>>>>> On Sat, 19 Mar 2005, "Bob" == Bob Proulx wrote:
Bob> Hi Mike!
Bob> Mike Dunphy wrote:
+> I have a debian 3.1 install and date reports UTC despite TZ=PST and
+> /etc/timezone = US/Pacific [...] despite the time really being 7:30 am
+> PST
Bob> What is the actual output of the date command? What timezone is it
Bob> printing? I don't believe this is a problem with GNU date. Please
Bob> show us the GNU date output. Here are examples from my system.
Bob> date Sat Mar 19 10:54:36 MST 2005
Bob> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Hi Bob,
thanks for the reply
Bob> I prefer the RFC-2822 compliant date string because it avoids
Bob> confusion over name collisions in the world wide timezones.
Bob> date -R Sat, 19 Mar 2005 10:54:49 -0700
Bob> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Bob> I prefer not to set the TZ variable at all and to use the system
Bob> default time. But if you are setting it then you may need to use
Bob> PST8PDT instead of PST.
Yes you are right it needs to be PST8PDT.
+> Any ideas ?
Bob> What does /etc/localtime symlink to? On my machine:
Bob> ls -l /etc/localtime lrwxrwxrwx 1 root root 31 2005-02-01 23:31
Bob> /etc/localtime -> /usr/share/zoneinfo/US/Mountain
that must be the problem I have no /etc/localtime ... I created it
and unset TZ and now it all works fine.
Bob> On Debian you can run the 'tzconfig' script to guide you through
Bob> reconfiguring the system timezone configuration.
yes I did that.
Bob> tzconfig
+> ntp commands also are that way ntpdate corvallis.cns.hp.com 19 Mar
+> 15:29:40 ntpdate[14761]: adjust time server 15.7.240.32 offset
+> 0.000424 sec
Bob> I believe NTP and other underlying time conventions should always be
Bob> in UTC. It avoids much confusion. If I recall correctly NTP always
Bob> operates in UTC. This is also true of other things such as revision
Bob> control systems and things like that.
Bob> On a different but related topic is timezone of the hardware clock.
Bob> You can specify if the hardware system clock is UTC or a local
Bob> timezone. This is useful when multi-booting less intelligent
Bob> systems that don't handle UTC time. On Debian this is configured in
Bob> the file /etc/default/rcS with "UTC=yes" or "UTC=no". Setting to
Bob> "no" may allow you to share the hardware system clock among multiple
Bob> OSs.
Thanks Bob ... I am working fine now. The confusing part was that
the date command was reporting UTC time and that it was PST.
Cheers
-mjd