Daylight Saving Time???

James Matheson jmrm%eng-dsl.cam at UCL-CS.ARPA
Wed Mar 27 21:00:47 AEST 1985


Leif Samuelsson writes
> Well, it seems that all 4.2BSD machines in Europe went on
> DST a week too early this year. As I see it there are three
> possible solutions:
> 
> 1) Fix and recompile ctime.c if you have sources.
> 
> 2) Remove the dst flag from the config file for a week. (Save vmunix!)
> 
> 3) Reset the date for a week. This is clearly wrong but is probably
>    the easiest way out.
> 
> Any other suggestions?

Yes, do the daylight saving time decision in a utility which calls
settimeofday() to set the timezone information appropriately. This could
be called from cron on the days when the changes occur (in England this
is the subject of annual legislation and hence not suitable to compile in);
the current value can be saved for the same utility to read and set on
reboot. The current ctime() scheme seems to make very poor use of the
flexibility provided by the timezone info in {gs}ettimeofday().



More information about the Comp.unix mailing list