|
From: Ethan A M. <merritt@u.washington.edu> - 2007-08-08 15:32:03
|
On Wednesday 08 August 2007 02:52, Hans-Bernhard Br=F6ker wrote:
> > This causes gnuplot's conversion from base year 1970 to 2000 to be
> > off by about 20220 seconds, which is about 5 1/2 =A0hours.
>=20
> We're not, as can be shown rather easily by looking at the relevant=20
> reference tool's output:
>=20
> $ date --date=3D'2000-01-01 00:00:00 UTC' +'%s'
> 946684800
Yes, but the code that is actually being used in time.c is this:
/* offset from UNIX epoch (1970) to gnuplot epoch */
static const long epoch_offset
=3D (long)((ZERO_YEAR - 1970) * 365.25) * DAY_SEC;
and ((ZERO_YEAR - 1970) * 365.25) * DAY_SEC
=3D (2000-1970) * 365.25 * 86400.0
=3D 946728000.0
which is not the same number.
=2D-=20
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|