[hfs-user] Date Offset
Thu, 28 Mar 2002 11:40:15 +0000
> I've calculated the date and time offset between 1904,
>Jan 1 midnight and 1970 as :
>time_t offset (365*66 + 17 ) *24*3600
Seems to agree with the value in the hfsutils source.
>1. I'd just like to know if my calculations are ok. The 17 accounts for
>the extra day in the 17 leap years which occur in this interval.
>2. I gathered that Mac uses GMT and the standard C-library time.h bases
>its calculations on UTC. Would this create any further offset to what
>I'm considering right now ? If so what would it be ?
>3. I also gathered that HFS uses local time and HFS plus uses GMT. Would
>it be a mistake to save up HFS dates as GMT ? In what way could this
>create problems ?
No idea - you may want to look at the hfsutils source and see how it deals
with times ...