Subject: [bug#48364] [PATCH 5/5] gnu: Add tz.

From: Stefan Reichör <[email-masked]>
Date: Thu, 13 May 2021 20:59:07 +0200

Another attempt to answer the question from Leo Famulari

I didn't get the question from the bugtracker by email:

,----
| I'm curious, how does it find the time zone database?
| 
| It should look them up at runtime via something like a TZDIR environment
| variable. It should not include a copy of the database, or else it will
| become "stale" before too long.
`----

Yesterday I tried to answer it directly in the web interface. My answer
didn't show up :-(

Now I try to answer per email

The timezone is determined by the go runtime function LoadLocation:

https://github.com/oz/tz/blob/main/zone.go#L77

LoadLocation does the lookup in the installed timezone database:

https://golang.org/pkg/time/#LoadLocation