UNIX Daylight Savings Time Question
Posted in 1999
Topics: General Discussion
Hi, I admit I got floored by this one. I know that UNIX has some facilities for daylight savings time. We have to cater for DST within our semi-data warehouse reporting application. The Informix "application" logic for handling DST exists, but how does UNIX handle the DST changeover? What happens, for example, to any cron jobs which might change the database and are running during the changeover (specifically as these might involve timestamps)? Look forward to hearing from y'all. -- "I'll Be Back" Obnoxio ************************************************ Sane? Hell, if I was sane, why would I be here? Get Your Private, Free Email at http://www.hotmail.com
If the cron job starts at midnight, and the DST changeover occurs at midnight, I would think it will depend on which of the two jobs win the clock cycle timeslice race. You could insure the DST changeover wins by altering your crontab entries to 00:01 (assuming DST changeover finishes in less than a minute, a pretty sure assumption). Suppose a cron job starts first (say at 23:59), and runs into the time change, which sets the clock back one hour from 00:00 to 23:00. Also suppose the job involves comparing "current time" to a db contained timestamp. How do you define "current time"? If it is current system time, it could be a Bad Situation. If you save the 23:59 timestamp to a "current time" variable and test against it, you would be OK. I think. ;-{> On Wed, 24 Mar 1999 10:38:29 GMT, "Obnoxio The Clown" <obnoxio@hotmail.com> wrote: <ndd> >What happens, for example, to any cron jobs which might change the database >and are running during the changeover (specifically as these might >involve timestamps)? <ndd>