Time now and system time
Lex Spoon
lex at cc.gatech.edu
Tue Jun 10 06:55:56 UTC 2003
Ned Konz <ned at bike-nomad.com> wrote:
> On Monday 09 June 2003 06:06 am, Lex Spoon wrote:
> > Derek Brans <brans at nerdonawire.com> wrote:
> > > I set my TZ environment variable to EST8EDT and that did the
> > > trick. Time class>>now evaluates to the correct time.
> >
> > It would be nice to know why Squeak needs this but "date" does not.
> > The code simply uses gettimeofday(), and so I would think you'd
> > get the same time from both places...... What does "date" do, if
> > not gettimeofday() ?!?!
> >
>
> $ TZ= date
> Mon Jun 9 21:59:17 UTC 2003
> $ date
> Mon Jun 9 14:59:20 PDT 2003
>
Oh, I misunderstood the situation. I thought Squeak was sensitive to TZ
but date was getting it right without the environment variable.
> > Incidentally, my time comes out correctly in Squeak on Debian, for
> > whatever reason.
>
> Do you have your hardware clock set to local time?
No. In my case, libc seems to be looking at /etc/timezone for the info.
Lex
More information about the Squeak-dev
mailing list
|