0

I want to create a compiled TZ database file from a posix expression.

Is there any unix utility which can create the TZ database out of the posix expression?

I do check the zic command but I was not able to find a way to provide posix expression rules as input to the zic. Is there any way to use posix expression with zic? eg. EST5EDT,M10.3.0,M2.3.0

I need the compiled database as I want timezone to be persistent across all the sessions so that /etc/localtime can be linked to the compiled database.

Directly setting TZ variable to posix expression will not help as it will not be persistent over session as well after reboot.

1 Answer 1

0

No, this is not possible.

POSIX rules can only account for the current rules, and can only include one paired set of DST transitions.

The tz database has entries such as America/New_York, which account for all the time zone rules over the entire history of the particular time zone.

The reality of time zones is very complex, including things like:

  • Daylight saving time transitions twice a year
  • Daylight saving time transitions four times in a single year
  • Base-offset changes one time in a particular year
  • Many of these changes from one year to the next, in some cases a different rule each year

More in the timezone tag wiki on StackOverflow

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .