|
From: Ethan M. <merritt@u.washington.edu> - 2007-08-08 00:42:46
|
gp_time.h contains the following definitions: /* defines used for timeseries, seconds */ #define ZERO_YEAR 2000 #define JAN_FIRST_WDAY 6 /* 1st jan, 2000 is a Saturday (cal 1 2000 on unix) */ #define SEC_OFFS_SYS 946684800.0 /* zero gnuplot (2000) - zero system (1970) */ #define YEAR_SEC 31557600.0 /* avg, incl. leap year */ #define MON_SEC 2629800.0 /* YEAR_SEC / 12 */ #define WEEK_SEC 604800.0 #define DAY_SEC 86400.0 The problem is, these values are not correct so far as I can determine. The actual mean number of seconds per year according to the Time Service Dept of the U.S. Naval Observatory is 31556926.0 This causes gnuplot's conversion from base year 1970 to 2000 to be off by about 20220 seconds, which is about 5 1/2 hours. A symptom of this is that if you read in time data using the "%s" timefmt, the time you get is wrong by 5 hours. Is there any reason we should tolerate this level of error? It seems very strange that anyone would have gone to the trouble of working out the zero point offsets, but failed to notice a 5 hour error. Am I missing something here? -- Ethan A Merritt |