When I sent the message below, I forgot to include some pertinent details
ablout the system I'm running on. I'm running Linux 2.2.14, and am running
date (GNU sh-utils) 2.0. In addition, my hardware clock is set to GMT, and
my timezone set to Pacific. Hope this helps.

On Sun, 11 Jun 2000, Todd A. Jacobs wrote:

> When I translate a date into seconds since the epoch, and then translate
> them back, the time is off by one hour. I need to manually subtract an
> hour to make the time accurate. An example follows:
> 
> _SEC=`date +%s`; echo $_SEC; date -d "1970-01-01 UTC +$_SEC sec -1 hour" \
> --utc; date --utc
> 
> This yields:
> 
>       960769639
>       Mon Jun 12 00:27:19 UTC 2000
>       Mon Jun 12 00:27:19 UTC 2000
> 
> However, if I remove the "-1 hour", I get:
> 
>       960769833
>       Mon Jun 12 01:30:33 UTC 2000
>       Mon Jun 12 00:30:33 UTC 200
> 
> My guess is that there's something wrong in the way it's dealing with the
> offset from UTC during daylight savings time. Have you seen this problem
> before?

-- 
Todd A. Jacobs
Senior Network Consultant


Reply via email to