glibc to uclibc Timezone mapping file

2.4k views Asked by At

I came across a mapping file for timezone strings from glibc to uclibc. It looks like this:

Africa/Abidjan=GMT0
Africa/Accra=GMT0
Africa/Addis Ababa=EAT-3
Africa/Algiers=CET-1
...

This file is quite old (4 years), and several new TimeZones have been added on glibc. However, I could not find the latest mapping file. The mapping file has 451 entries, where as the total timezone strings supported these days is over 900. Is there an updated mapping file for the same?

1

There are 1 answers

0
Matt Johnson-Pint On

From the data you provided, the left side appears to be an IANA/Olson time zone identifier. You can see a rough list of these zones and their offsets on Wikipedia.

The right side appears to be a time zone abbreviation and the standard offset for the zone, with its sign inverted. This might be a POSIX style time zone string. I can't tell since you only provided a small sampling.

You can read more about both of these in the timezone tag wiki. Be sure to read about the limitations of POSIX time zones.

Some searching found this thread where they discuss that uclibc only supports POSIX time zones. If you're using buildroot, you could see if the "tzdata" package will work for you, but I'm not sure if it will or not. If it does, you would use it the same way that glibc does, with the TZ variable setting (see the last option at the bottom of the page).

As far as mapping IANA to POSIX zones - any list you have is going to be limited to the current time zone rules, and then still won't cover necessarily everything. Only the IANA zones are comprehensive. It would also be a one-way mapping. You could not go the other direction. I searched, but did not find a direct source for this mapping. If you find one, please let me know.