GitHub
Alire
Overview
Zoneinfo is an IANA timezone datetime manipulation library for Ada 2022. Built on the TZif library for IANA database access, it provides a clean, type-safe API for working with timezones, parsing ISO 8601 strings, formatting datetimes, and discovering timezone sources. The library follows hybrid DDD/Clean/Hexagonal architecture with functional error handling and is designed for both desktop and embedded platforms.
Features
-
Timezone-Aware Datetimes - Instant, Zoned, and Civil time representations
-
ISO 8601 Parsing - Parse datetime strings with timezone offsets and zone IDs
-
Datetime Formatting - Format datetimes as ISO 8601 or custom patterns
-
Timezone Discovery - Find system timezone, search by pattern/region/regex (bounded arrays)
-
Duration Arithmetic - Add/subtract durations, calculate differences
-
TZif Integration - Built on the TZif library for IANA timezone database access
-
Result Monad Error Handling - No exceptions, functional error handling
-
4-Layer Hexagonal Architecture - Domain → Application → Infrastructure → API
-
SPARK Verified - Domain + Application layers formally verified
-
Embedded Safety - No implicit heap allocations, bounded types, static dispatch
-
Library Standalone - Explicit Library_Interface for ABI stability
SPARK Formal Verification
| Status | |
|---|---|
| Scope | Domain + Application Layers |
| undefined | ---- |
| Mode | gnatprove --mode=prove --level=2 |
| undefined | ---- |
| Results | See CHANGELOG for current verification statistics |
| undefined | ---- |