[hfs-user] Date Offset

Entwicklung entwicklung@whengenibk.de
Thu, 28 Mar 2002 10:33:29 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C1D644.00379F50
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello Listers,
               I've calculated the date and time offset between 1904, =
Jan 1 midnight and 1970 as :

time_t offset =3D (365*66 + 17 ) *24*3600

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 ?

Could anybody who knows more about this please help me out ?.. would be =
grateful for any tips / suggestions.

Regards,
Nandini Hengen

------=_NextPart_000_0007_01C1D644.00379F50
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello Listers,</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
I've calculated the date and time offset between 1904, Jan 1 midnight =
and 1970=20
as :</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>time_t offset =3D (365*66 + 17 )=20
*24*3600</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>1. I'd just like to know if my =
calculations are ok.=20
The 17 accounts for the extra day in the 17 leap years which occur in =
this=20
interval.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>2. I gathered that Mac uses GMT and the =
standard=20
C-library time.h bases its calculations on UTC. Would this create any =
further=20
offset to what I'm considering right now ? If so what would it be =
?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>3. I also gathered that HFS uses local =
time and HFS=20
plus uses GMT. Would it be a mistake to save up HFS dates as GMT ? In =
what way=20
could this create problems ?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Could anybody who knows more about this =
please help=20
me out ?.. would be grateful for any tips / suggestions.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Nandini =
Hengen</FONT></DIV></BODY></HTML>

------=_NextPart_000_0007_01C1D644.00379F50--