A drop in the ocean

Libical system timezone integration

with 8 comments

EDS uses libical library for accessing timezone information. Libical used to maintain its own timezone data and we had to update it, if any zoneinfo changes. With GNOME 2.19.6 libical would read timezones from the system, stored generally at /usr/share/zoneinfo or /usr/lib/zoneinfo or /etc/zoneinfo. The timezone files in libical are not yet removed since win32 would need them. My special thanks to Milan for testing the patch and fixing a crash in 64 bit arch. I thank sankar and andre too for the same. I have tested it throughly in 32 bit machine. Akhil will be building evo in 64 bit machine and will be testing it more. If anyone find any issues, please let know and you will be getting a fix immediately :) I will work out a patch for win32 too during sometime and remove all the files which we maintain in libical. Now except for systems which use windows, all the others can get the latest time zone using libical.

Written by chenthill

July 31, 2007 at 11:41 am

Posted in gnome

8 Responses

Subscribe to comments with RSS.

  1. I am the current maintainer of the upstream libical and am very interested in learning more about what you did to make this happen. You are learning all timezone data from the underlying host system? Do you have the full functionality of libical available in this case? And if so, is this something that could be backported to the upstream libical?

    ig

    October 10, 2007 at 7:18 pm

  2. Ig, yes am reading all the timezones from the underlying system. libical works the same way as before. The interfaces remain intact and so clients using libical wont even know about this change. I have not removed the timezone files which we hold in libical since they would be used for windows. This integration has been done only for Linux and should work fine for Mac.

    chenthill

    October 17, 2007 at 5:05 am

  3. Ig, BTW where (in which repository) is libical maintained in upstream ? If I had known that, I would have sent the patch to upstream as well…

    chenthill

    October 17, 2007 at 5:11 am

  4. We’re maintaining it at the original upstream location, freeassociation.sf.net
    I’ve been implementing some patches yet, we’er planning to do a next release soon..
    I’ve started putting some simple text information here, maybe we might move to a wiki sometimes later.

    dothebart

    December 1, 2007 at 1:43 pm

  5. This is a great discussion and great to hear that such an operation was successfully done.

    Could you please comment further on how the calls that were to icaltimezone_get_builtin_timezone were substituted to read in the system timezone?

    Thanks very much for your input!

    vjmq

    March 22, 2008 at 5:06 am

  6. There are two calls which fetch the information for the timezones which are icaltimezone_parse_zone_tab and icaltimezone_load_builtin_timezone. They were modified to fetch the timezones from the system. icaltz-utils.c has the functions which identify the location of the timezones in the system and convert the tzfile to ical format.

    chenthill

    March 25, 2008 at 7:37 am

  7. I would like to use libc’s localtime tm_zone and tm_gmtoff in to retrieve icaltimezone_get_builtin_timezone_by_offset, but the tm_zone doesn’t necessarily match the zone name, for example localtime may return a tm_zone of PDT whereas the zone location parsed from zoneinfo would be PST/PDT,

    is there a known way around this that would allow me to use the offset and zone to retrieve a timezone without modifying libical?

    Thanks

    vjmq

    March 30, 2008 at 6:46 am

  8. If it is possible to merge the changes made from our local branch maintained at svn.gnome.org. We can probably pick up the packages from the main stream community. Dothebart, I tried to get ur mail id but could not. please put ur email id here.

    chenthill

    July 3, 2008 at 6:49 am


Leave a Reply