TZif is an Ada 2022 library for parsing and querying IANA’s compiled timezone information (TZif format, RFC 9636) files. It provides a clean, functional API with Result monad error handling, hexagonal architecture, and embedded-safe patterns.
SPARK Formal Verification
Designed for safety-critical, embedded, and high-assurance applications with full SPARK compatibility.
Status SPARK Proved
Scope Domain + Application layers (value objects, containers, parser, operations, ports)
Mode gnatprove --mode=prove --level=2
Results 1350 checks: 1155 proved, 195 unproved (in generic instantiations)
Features
-
Parse IANA TZif binary files (versions 1, 2, and 3)
-
Query timezone transitions at any Unix epoch time
-
Discover and validate timezone data sources
-
Find zones by ID, pattern, region, or regex
-
Detect the system’s local timezone
-
Cross-platform: Linux, macOS, BSD, Windows 11, Embedded
-
4-layer hexagonal architecture (Domain, Application, Infrastructure, API)
-
Result monad error handling (via
functionalcrate) -
Generic I/O plugin pattern for platform portability
Release Notes