Skip to content

Commit

Permalink
docs: revise README
Browse files Browse the repository at this point in the history
  • Loading branch information
Jumpaku committed Mar 15, 2024
1 parent 37dbcd1 commit 7619bbd
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,34 @@

## Overview

This repository provides information with respect to timezones based on the IANA TZ database.
This repository provides information for timezones based on the IANA TZ database.
The information is available in a JSON file located at `gen/tzot.json`.


## What timezone is

A timezone is a geographic region of the Earth that observes the same standard time, encompassing some timezone offsets.
A timezone offset represents the difference between the local time in a specific timezone and the Coordinated Universal Time (UTC).
In a timezone, timezone offset may transition to the another timezone offset by factors like daylight saving time adjustments or political changes in laws.
The timezone offset transitions which are going to occur in the future can be scheduled by transition rules.
In a timezone, transitions between timezone offsets may occur due to factors such as daylight saving time adjustments or political changes in laws.
The timezone offset transitions that are going to occur in the future can be scheduled by several types of transition rules.

The IANA Time Zone Database ( https://www.iana.org/time-zones ) is a comprehensive database used to manage timezones.


## What this repository provides

This repository includes a program that parses the IANA Time Zone Database and extracts the information regarding timezones, each of which consists of timezone offset transitions and transition rules, as a JSON file to facilitate the handling of the information.
That program is implemented using the `java.time` package in Kotlin.
This repository includes a program that parses the IANA Time Zone Database and extracts the information regarding timezones, each of which consists of timezone offset transitions and transition rules.
The extracted data is then formatted into a simply structured JSON file `gen/tzot.json`, specifically designed for handling the timezone offset transitions in various programming languages.
That program is implemented in Kotlin using the `java.time` package.

Additionally, this repository includes an automated mechanism for detecting updates to the database and overriding the `gen/tzot.json`.
This mechanism is implemented as a GitHub Actions workflow which updates the `gen/tzot.json` monthly if a new version of the database is detected.

The resulting `gen/tzot.json` is a simply structured JSON file, specifically designed for handling timezone offset transitions in various programming languages.


## Format of gen/tzot.json

The format of the `gen/tzot.json` is a JSON value that can be assigned to a type `TzotJSON`.
The definition of the type is available in `tzot.ts`.
The definition of the type is available in `tzot.ts`, which specifies the structure of the JSON.

The below shows an example of the JSON value.

Expand Down

0 comments on commit 7619bbd

Please sign in to comment.