On Nov 13, 2008, at 4:48 PM, Louis Guindon wrote:
This application is aimed for an embedded platform where a limited set of Linux functionalities is available. Uclibc is used on the platform and the /etc/timezone and the whole zoneinfo directory tree are not supported.
That's unfortunate - my mobile phone has (at least in the first OS release, according to a list of files given by its jailbreakers) the full Olson timezone database on it. (Then again, my mobile phone apparently has 128MB of main memory, and has 8GB of flash memory; maybe your embedded platform is a bit smaller.)
The feature where the POSIX time zone echoed to /tmp/TZ and the busybox date command are working well together. But a POSIX string for the timezone is required.
Unfortunately, that is an insoluble problem in the general case; the Olson timezone mechanism is more powerful than the POSIX time zone specification - a POSIX time zone can't, for example, handle a locale where the starting and ending dates for daylight savings time change arbitrarily every year, while the Olson code can. At best, you could, for example, have a program that reads the source files for the Olson database and picks the *last* start-of-DST and end- of-DST transition rules and constructs a POSIX time zone value from them. It might be possible to modify the zic program (the program that reads the source files and generates the binary files from them).