999000000

andrew at bishop.dropbear.id.au andrew at bishop.dropbear.id.au
Wed Aug 29 14:55:39 EST 2001


On Wed, 29 Aug 2001, David Gibson wrote:

> On Wed, Aug 29, 2001 at 12:05:19PM +1000, Matthew Hawkins wrote:
> > On Wed, 29 Aug 2001, Howard Lowndes wrote:
> > > Slightly wrong
> > >
> > > $ date -u --date="1 jan 1970 + 1000000000 secs"
> > > Sat Sep  8 15:46:40 UTC 2001
> > > $ date  --date="1 jan 1970 + 1000000000 secs"
> > > Sun Sep  9 01:46:40 EST 2001
> > >
> > > So it's Sun morning for party time in Oz.
> >
> > Look at it another way, everybody in the UTC timezone only gets one time
> > to celebrate it, we get two.  There was some problem in starting at
> > quarter to four on saturday and going through to 2am sunday?  ;-)
>
> Nope.  Unix times are always UTC.  Hence UTC 15:46 == AEST 1:46 is the
> only time.

Ahem.  Sorry to point this out (since it's already been corrected this
thread), but the times above are incorrect (both count from midnight EST,
not midnight UTC).

The correct time is:

[onceler at lerkim onceler]$ perl -e 'print scalar localtime 1e9'
Sun Sep  9 11:46:40 2001

or, if you prefer using date:

[onceler at lerkim onceler]$ date --date="1 jan 1970 UTC + 1000000000 secs"
Sun Sep  9 11:46:40 EST 2001

This is, of course, equivalent to Sun Sep  9 01:46:40 UTC 2001.

Andrew





More information about the linux mailing list