IANA Timezone Information File Library for Ada 2022

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 functional crate)

  • Generic I/O plugin pattern for platform portability


Release Notes

4 Likes

:rocket: TZif v2.0.0 has been released! :partying_face:

It incorporates your feedback and features for embedded and desktop platforms. Check it out!

Release Notes: 2.0.0

3 Likes

:rocket: TZif v3.0.0 for Ada 2022 has been released! :partying_face:

GitHub Release v3.0.0

TZif is an Ada 2022 library for parsing and querying IANA’s compiled timezone information (TZif format, RFC 9636).

Test Coverage: 424 unit + 134 integration + 11 examples = 569 total

* Functional.Try.Map_To_Result pattern replaces manual exception handlers

* Functional.Try.Map_To_Result_With_Param for parameterized operations

* Smart constructor pattern with declarative exception mapping

* Refactored all infrastructure adapters to use Map_To_Result pattern

* Zone repository: All file operations use declarative exception mapping

* Improved exception handling consistency across all I/O boundaries

* Windows tests: Win32 GetDynamicTimeZoneInformation + CLDR mapping

* Windows CI workflow with URL pin to functional v4.0.0

* Exception mapping arrays for declarative error categorization

* Resource_Error kind added to Error_Kind enumeration

1 Like