[prev in list] [next in list] [prev in thread] [next in thread] 

List:       suse-programming-e
Subject:    Re: Re: [suse-programming-e]  converting a timestamp
From:       Per Jessen <per () computer ! org>
Date:       2006-08-16 18:26:03
Message-ID: ebvnvr$6he$3 () saturn ! local ! net
[Download RAW message or body]

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


-- 
To unsubscribe, email: suse-programming-e-unsubscribe@suse.com
For additional commands, email: suse-programming-e-help@suse.com
Archives can be found at: http://lists.suse.com/archive/suse-programming-e

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic