tzdata

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package tzdata embeds the IANA time zone database in the binary, for apps that run schedules in a container image without one (scratch, distroless and many slim images ship no /usr/share/zoneinfo).

Without a database, time.LoadLocation finds only "UTC", so a schedule in "Europe/Berlin" fails to load; with cron.LoadZone that failure is loud at boot, but the fix is this package. Import it once, for its side effect, in the main package:

import _ "github.com/ubgo/workflow/cron/tzdata"

It is opt-in because it adds about 450 KB to the binary, which an app on a host with zoneinfo does not need. It is the standard library's time/tzdata under a name that says why a scheduler imports it; Go uses the embedded copy only when the host has no database (or ZONEINFO points nowhere), so a host's newer rules still win.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL