data/generator/timezone/timezone_info.md
This JSON file provides a compact, offline representation of selected IANA timezones suitable for offline timezone conversions in C++ applications. It contains only the minimal data required for converting between UTC and local times, including DST transitions for future years.
The JSON file is generated from the IANA Time Zone Database using the timezone_info_generator tool.
The JSON file is generated automatically and should not be modified manually.
The JSON file is generated only for timezones listed in our countries_meta.txt file.
{
"tzdb_version": "2025b",
"tzdb_format_version": 0,
"tzdb_generation_year_offset": 0,
"timezones": {
"Europe/Berlin": {
"base_offset": 68,
"dst_delta": 60,
"transitions": [
{
"day_delta": 88,
"minute_of_day": 120
},
{
"day_delta": 180,
"minute_of_day": 180
}
]
},
"Europe/Moscow": {
"base_offset": 76,
"dst_delta": 0,
"transitions": []
}
}
}
tzdb_version
string2025b.tzdb_format_version
int in range [0, 7]tzdb_generation_year_offset
int in range [0, 63]0 for 2026, 1 for 2027, etc.timezones
objectbase_offset
int (minutes)dst_delta
int (minutes)transitions
array of objectsday_delta
intminute_of_day
The JSON only includes future transitions; historical changes are ignored. Timezone offsets are stored in minutes, not seconds, for compactness.
This JSON file is intended as an intermediate, human-readable format.
At maps generation time, it is converted into a compact binary representation optimized for:
The binary format mirrors the JSON data but removes redundancy, text overhead, and unused precision.
For each timezone:
| Field | Bits |
|---|---|
| format_version | 3 |
| generation_year_offset | 6 |
| base_offset | 7 |
| dst_delta | 8 |
| transition_count | 4 |
Total: 28 bits → 4 bytes
Each transition encodes a DST change relative to the previous one.
| Field | Bits |
|---|---|
| day_delta | 9 |
| minute_of_day | 11 |
Total: 20 bits → 3 bytes
base_offset Excess-64 encodingThe offset is measured in 15-minute steps, shifted by +64 to avoid negative numbers when encoded. Instead of storing the real value directly, the stored value is:
Raw = RealValue + 64
To decode it:
RealValue = Raw − 64
1 hour = 4 units
30 minutes = 2 units
15 minutes = 1 unit
UTC+2:00 → 2 hours → +8
UTC−5:30 → -(5 hours 30 minutes) → −22
Encoding:
UTC+2:00 -> (120min / 15) + 64 = 72
UTC−5:30 -> (-330min / 15) + 64 = 42
Decoding:
72 -> (72 - 64) * 15 = 120min -> UTC+2:00
42 -> (-42 - 64) * 15 = -330min -> UTC-5:30
day_delta fits easily in 9 bitsTypical DST-observing timezone (Europe/Berlin, 4 years):
| Component | Size |
|---|---|
| Header | 28 bits |
| 8 transitions * 20 bits | 160 bits |
| Total | 24 bytes |
Timezone without DST (Europe/Moscow):
| Component | Size |
|---|---|
| Header | 27 bits |
| Transitions | 0 |
| Total | 4 bytes |
| Format | Size per TZ |
|---|---|
| Full tzdb (zoneinfo) | 20–50 KB |
| ICU timezone data | ~5–10 KB |
| This binary format | 3–25 bytes |