Date makes a one hour miscalculation under certain circumstances: > $ date > Sun Apr 16 20:12:04 PDT 2000 > $ date --date 'Sun Apr 16 20:12:04 PDT 2000' > Sun Apr 16 20:12:04 PDT 2000 > $ date --date 'Sun Apr 16 20:12:04 PDT 2000' +%s > 955941124 > $ date --date 'Jan 1 00:00:00 GMT 1970 + 955941124 seconds' > Sun Apr 16 21:12:04 PDT 2000 I believe that the original value of seconds since the epoch is right, but that the calculation step is at fault. This case provides further evidence that something funny is going on with the calculation. We increase by one second, but get an hour: > $ date --date 'Wed Dec 31 16:00:00 PST 1969 + 9971999 seconds' > Sun Apr 26 01:59:59 PST 1970 > $ date --date 'Wed Dec 31 16:00:00 PST 1969 + 9972000 seconds' > Sun Apr 26 04:00:00 PDT 1970 Date version: > $ date --version > date (GNU sh-utils) 2.0 > Written by David MacKenzie. > > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. OS version: > $ uname -a > Linux <some system> 2.2.14aa1 #1 SMP Sat Jan 29 15:49:44 PST 2000 i686 unknown I've tried this on a FreeBSD machine and a NetBSD machine and had the same results. Peter
