Libical system timezone integration

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.


8 thoughts on “Libical system timezone integration

  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?

  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.

  3. We’re maintaining it at the original upstream location,
    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.

  4. vjmq

    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!

  5. 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.

  6. vjmq

    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?


  7. If it is possible to merge the changes made from our local branch maintained at 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.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s