1 Nov 2009 herzi   » (Master)

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

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.

Syndicated 2009-10-30 15:56:14 from herzi.eu

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!