Daylight Savings Time

Barry Margolin barmar at mit-eddie.UUCP
Fri Dec 6 18:11:25 AEST 1985

In article <1679 at hammer.UUCP> seifert at hammer.UUCP (Snoopy) writes:
>In article <1727 at uw-beaver> golde at uw-beaver.UUCP (Helmut golde) writes:
>> I am unclear as to why *any* application program would ever want to know
>> whether daylight savings time is in effect or not.
>Example: date(1) needs to know.  Typical output from date:
>Mon Dec  2 14:30:03 PST 1985
>		     ^^^
>Date needs to know if it is dst or not for printing out the date,
>and also for setting the date, since it has to convert the
>time given by root from local time to GMT before calling

All that is required in order to do this is the name of the current
time zone and the difference between it and GMT.  The system doesn't
need to know the special relationship between PST and PDT; as far as it
need be concerned these are just arbitrary names for GMT-8hours and
GMT-7hours (or maybe it is vice-versa).  The above comments are based on
a Unix bias.

On Multics, the date/time conversion software includes a table listing
many of the world's time zone names (in several languages, no less),
along with the corresponding difference from GMT.  The site can specify
any of the zones as the system default, and a user can choose any as his
default for the login session.  When entering times, one may specify a
time zone explicitly, and when printing out times one can ask that it be
printed out in any recognized time zone.  No special understanding of
Daylight Savings Time exists -- the system administrators merely change
the default time zone twice a year (if necessary -- our primary exposure
system is in Arizona, which doesn't use DST).  Many of our customers are
outside the US, so hardcoding our DST rules would have been a nightmare.
    Barry Margolin
    ARPA: barmar at MIT-Multics
    UUCP: ..!genrad!mit-eddie!barmar

More information about the Comp.lang.c mailing list