On Nov 13, 2008, at 3:05 PM, Louis Guindon wrote:
My goal is to provide a user interface showing the information derived from the TZ zone name. Based on the selected TZ zone name by the user, I will assign the corresponding POSIX time zone string to the Linux /tmp/TZ file. This way the local time will show up properly for the user.
I.e., you're trying to make an application to give the user a list of time zones, let them select a time zone, and make that the system time zone? Note that most if not all Linux systems use the Olson time zone database, so they are not required to have a POSIX time zone string as the time zone setting.
However, I am having difficulty to find a reliable source for POSIX time zone string representation for each defined time zone in the Olson database.
There isn't necessarily a POSIX time zone string representation for each defined time zone. POSIX time zone strings can't represent an arbitrary Olson-style time zone - they can't, for example, handle time zones where the rules change from year to year.
I don’t know if there is an alternative way, but I am also wandering if the TZ time zone name can used directly without going through the POSIX representation of the time zone.
On many UN*Xes, it can (Solaris, most if not all other SVR4 derivatives, most if not all Linux distributions, {Free,Net,Open,DragonFly}BSD, Mac OS X/iPhone OS).