Daylight Savings Time, Leap Years, ctime, and date

Adam Moskowitz adamm at necis.UUCP
Tue Apr 4 08:29:31 AEST 1989


Yes, when I came in this morning my system tried to tell me it was an hour
earlier that it really was. Arrgh! So off I go to hack the various bits of
code to understand the new rules for DST and what do I find? A mess! I didn't
even try to clean it up - I just patched the correct magic constant and hoped
for the best. However, it brought up the following questions:

  1) Does anyone know if the version of ctime (and its relatives) in
     System V Release 4 have the new DST rules built into them?
  
  2) Does anyone know if the new versions are less naive about determining
     leap years? It seems the current routines only use the "year % 4 ==0"
     rule.
  
  3) Will the newest version of the date command function after the year
     1999? All the versions I can find (BSD and sVr2.x) croak on non-
     twentieth-century years.
  
  4) Was anything done to make it easier to rewrite the rules for DST?
     (In other words, I don't want to recompile ctime and relink every
     program that uses it the next time the congresscritters decide to
     pass useless legislation.)


Email replies are preferred; I'll summarize if I get anything worthwhile.
-- 
Adam S. Moskowitz	            ...!(backbone)!{necntc,encore}!necis!adamm

    "Bon-hommy," went on Eeyore gloomily.  "French word meaning
     bonhommy," he explained.  "I'm not complaining, but There It Is."



More information about the Comp.unix.questions mailing list