Time, Time Zone and the total mess… (continued)

30 10 2009
This blog post is intended to be a reply containing the information that I would have needed abut half a year ago:


  1. as Jürg has correctly pointed out: gmtime() would have helped me a lot (but isn't portable)

  2. as I realized during the last week, replacing mktime() with timegm() would have properly helped, too



Going along with timegm() also yields exactly the results that I expected. This makes things a little easier as all the times in my application are UTC times and will properly get converted into local times when using… It also allows things to become a little easier as I can assume that all times in my application are UTC times.

So right now, I'm trying to get the g_timegm() patch into glib, so there is a portable, threadsafe (as in “does neither modify your environment variables nor use static variables”) implementation people can use in their applications.


Trackbacks


No Trackbacks

Comments

Display comments as (Linear | Threaded)
No comments

Add Comment


Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA