ken_jennings@bellsouth.net wrote:
Yeah, DST is a bear. I gather you're trying to generate epoch time from a timestamp that is already recorded in a log.
Yep, that's it.
If the DST state is not recorded in the log as part of the time stamp and the system observes DST then you' are going to have to determine it yourself . And that's for the timestamp time, not for the "current" system time, so you have to figure out if it WAS DST in the past not if it IS DST now.
It's just far too much work for a simple conversion, me thinks. Apart from my using mktime(), it really should just be 1) turn the timestamp into seconds and 2) apply the timezone offset. Whether or not the origin system or the current system has or had DST in effect should be irrelevant as it is already represented in the offset? I'm beginning to think I might as well work out the seconds myself - leap-years and leap-seconds are well-defined entities. /Per Jessen, Zürich