On 2025-11-14 08:48, kirill.gagarski--- via tz wrote:
I noticed that zonedata now ships with zonenow.tab file which is exactly what we need for our UI and meets our needs more precisely.
Unfortunately it seems quite impossible to migrate old data to this new notation automatically. For example, hte fact that 'Europe/Berlin' is covered by 'Europe/Paris' in zonenow.tab is not mentioned anywhere. Is there a way to determine this fact from tzdata without deep analysis of the rules done by myself?
checknow.awk already does that analysis. The attached proposed patch causes it to put the zone equivalence class information into now.ck, if you run the command 'make now.ck'. I'm attaching the resulting now.ck that I just built that way. This is all a bit of a hack, but it was easy for me to add and I hope it serves your purpose.
Other simple question: is there a way to know what is "now" in zonenow? Is it defined by the release date of a new version?
That's the intent, yes. By default, "now" is when you run "make now.ck", which is run as part of the release check process (see "make public"). I suppose in theory this value of "now" could be far enough from the release timestamp that zonenow.tab could be wrong for the release timestamp, but this is so unlikely that I haven't worried about it: the timestamps differ by at most a few minutes in practice, and if zonenow.tab would mutate that soon in the future - something that has never happened - I'd likely just wait a few minutes before releasing. You can specify "now" by running "make CHECK_NOW_TIMESTAMP=$N now.ck", where $N is the number of seconds since 1970, not counting leap seconds. The now.ck file's first column specifies the value of "now" that was used to build now.ck.