Documentation
¶
Overview ¶
Package tz is the server's time zone. It starts as the machine's (or the TZ environment variable's), and an admin can pick another in Settings, which is what the logs, holiday rows and anything else that goes by the server's clock use from the server's next start. It can't change while the server runs: Go's local time zone is read without a lock everywhere.
Index ¶
Constants ¶
const Setting = "time_zone"
Setting is the IANA name of the time zone the admin picked, such as America/Juneau; empty means the machine's own.
Variables ¶
This section is empty.
Functions ¶
func InUse ¶
func InUse() string
InUse is the name of the time zone the server runs in: the admin's pick as of its start, or the machine's (System), or "" when that isn't known.
func Load ¶
Load switches the server to the time zone the admin picked. Call it once at startup, before anything else runs.