From 9bac7e2276c12b9ae06c666a01a8be42f8e16ddc Mon Sep 17 00:00:00 2001 From: Christopher De Vries Date: Mon, 27 Apr 2026 07:16:35 -0400 Subject: [PATCH 1/8] update dependencies --- manifest.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index 0775b0d..1f6aa3e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -3,10 +3,10 @@ packages = [ { name = "filepath", version = "1.1.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "filepath", source = "hex", outer_checksum = "B06A9AF0BF10E51401D64B98E4B627F1D2E48C154967DA7AF4D0914780A6D40A" }, - { name = "gleam_stdlib", version = "0.65.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "7C69C71D8C493AE11A5184828A77110EB05A7786EBF8B25B36A72F879C3EE107" }, - { name = "gleam_time", version = "1.5.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_time", source = "hex", outer_checksum = "D560E672C7279C89908981E068DF07FD16D0C859DCA266F908B18F04DF0EB8E6" }, - { name = "gleeunit", version = "1.7.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "CD701726CBCE5588B375D157B4391CFD0F2F134CD12D9B6998A395484DE05C58" }, - { name = "simplifile", version = "2.3.0", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "0A868DAC6063D9E983477981839810DC2E553285AB4588B87E3E9C96A7FB4CB4" }, + { name = "gleam_stdlib", version = "1.0.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "960090C2FB391784BB34267B099DC9315CC1B1F6013E7415BC763CEF1905D7D3" }, + { name = "gleam_time", version = "1.8.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_time", source = "hex", outer_checksum = "533D8723774D61AD4998324F5DD1DABDCDBFABAFB9E87CB5D03C6955448FC97D" }, + { name = "gleeunit", version = "1.10.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "254B697FE72EEAD7BF82E941723918E421317813AC49923EE76A18C788C61E72" }, + { name = "simplifile", version = "2.4.0", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "7C18AFA4FED0B4CE1FA5B0B4BAC1FA1744427054EA993565F6F3F82E5453170D" }, ] [requirements] From f3a81604b86e1f7e92bc7fe74a2f01bb0ae0cd1f Mon Sep 17 00:00:00 2001 From: Christopher De Vries Date: Sat, 8 Aug 2026 15:09:40 -0400 Subject: [PATCH 2/8] Reference zones for portable timezone database --- README.md | 13 +++++++++---- manifest.toml | 15 ++++++++++----- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index adf5f35..dc2dec6 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,12 @@ package manager for your operating system to keep the time zone database up to date. All common unix variants have time zone database packages and install the time zone database files into the `/usr/share/zoneinfo` directory by default. +If, however, your system does not have time zone data installed, you can use +the [zones](https://zones.hexdocs.pm/) package to install a database of +timezone data as a gleam library and dependency. To use the zones timezone +data get the database using the `zones.database` function rather than +`database.load_from_os` or `database.load_from_path`. + ## MacOS The files should be included in your operating system by default. Check the `/usr/share/zoneinfo` directory and see if they are present. @@ -148,7 +154,6 @@ Similarly, using DNF: sudo dnf install tzdata ``` ## Windows -Microsoft Windows has a different mechanism for handling time zones, however -you can install the IANA Time Zone Database by [downloading the latest -version](https://www.iana.org/time-zones) and compiling the zone files using -[the directions in the repository](https://data.iana.org/time-zones/tz-link.html). +Microsoft Windows has a different mechanism for handling time zones, so we +recommend using the [zones](https://zones.hexdocs.pm/) portable gleam timezone +data library. diff --git a/manifest.toml b/manifest.toml index 1f6aa3e..37f3989 100644 --- a/manifest.toml +++ b/manifest.toml @@ -1,12 +1,17 @@ -# This file was generated by Gleam -# You typically do not need to edit this file +# Do not manually edit this file, it is managed by Gleam. +# +# This file locks the dependency versions used, to make your build +# deterministic and to prevent unexpected versions from being included +# in your application. +# +# You should check this file into your source control repository. packages = [ { name = "filepath", version = "1.1.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "filepath", source = "hex", outer_checksum = "B06A9AF0BF10E51401D64B98E4B627F1D2E48C154967DA7AF4D0914780A6D40A" }, - { name = "gleam_stdlib", version = "1.0.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "960090C2FB391784BB34267B099DC9315CC1B1F6013E7415BC763CEF1905D7D3" }, + { name = "gleam_stdlib", version = "1.0.5", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "CEE5B6C076A85B45F60C585F4316C63EC8B7127C119D5738C3958A9C4D50404E" }, { name = "gleam_time", version = "1.8.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_time", source = "hex", outer_checksum = "533D8723774D61AD4998324F5DD1DABDCDBFABAFB9E87CB5D03C6955448FC97D" }, - { name = "gleeunit", version = "1.10.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "254B697FE72EEAD7BF82E941723918E421317813AC49923EE76A18C788C61E72" }, - { name = "simplifile", version = "2.4.0", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "7C18AFA4FED0B4CE1FA5B0B4BAC1FA1744427054EA993565F6F3F82E5453170D" }, + { name = "gleeunit", version = "1.11.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "EC31ABA74256AEA531EDF8169931D775BBB384FED0A8A1BDC4DD9354E3E21826" }, + { name = "simplifile", version = "2.7.0", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "A2727627B063E87351934C7F7F008F2D1FDB16F6DE0B8C79F9E46459CFC9C164" }, ] [requirements] From ce2ff0da203d0f81a36b553b1b417b3989ef9345 Mon Sep 17 00:00:00 2001 From: Christopher De Vries Date: Sat, 8 Aug 2026 15:13:01 -0400 Subject: [PATCH 3/8] Update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c888eb..48d525d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v1.1.3 - 2026-08-08 +- Add references to the zones gleam package with portable timezone data + +## v1.1.2 - 2025-11-01 +- Fix issue with documentation. + ## v1.1.1 - 2025-09-29 - Fix issue with leap second tables being recorded in unix leap time rather than unix time. From 0a9b0ddb6e01ff322497684a0639d2004fd6b67c Mon Sep 17 00:00:00 2001 From: Christopher De Vries Date: Sat, 8 Aug 2026 15:15:21 -0400 Subject: [PATCH 4/8] Update some README links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dc2dec6..f60ecb2 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,13 @@ gleam add tzif@1 # Using the Package There are three modules in the `tzif` package: - `tzif/database` has utilities for loading the IANA Time Zone database. -- `tzif/tzcalendar` has utilities for converting a [gleam_time](https://hexdocs.pm/gleam_time/) +- `tzif/tzcalendar` has utilities for converting a [gleam_time](https://gleam-time.hexdocs.pm/) timestamp into date and time of day in a time zone. - `tzif/parser` has functions and records for parsing TZif formatted data. The most straightforward use would be to load the database from the default location on the operating system, and then obtain a timestamp using the -[gleam_time](https://hexdocs.pm/gleam_time/) package, and convert that timestamp +[gleam_time](https://gleam-time.hexdocs.pm/) package, and convert that timestamp into a time of day in a time zone using the IANA time zone name. An example of that is shown in the code below. From 9d0e73d229ff71bd47c888e405a1bff1ba6aaca4 Mon Sep 17 00:00:00 2001 From: Christopher De Vries Date: Sat, 8 Aug 2026 15:31:08 -0400 Subject: [PATCH 5/8] update documentation --- gleam.toml | 10 ++++++---- pages/examples.md | 12 ++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 pages/examples.md diff --git a/gleam.toml b/gleam.toml index e3afffd..95c3f44 100644 --- a/gleam.toml +++ b/gleam.toml @@ -7,10 +7,12 @@ version = "1.1.2" description = "Time Zone Information File Utilities" licences = ["MIT"] repository = { type = "github", user = "devries", repo = "timezone" } -# links = [{ title = "Website", href = "" }] -# -# For a full reference of all the available options, you can have a look at -# https://gleam.run/writing-gleam/gleam-toml/. + +[documentation] +pages = [ + { title = "Changelog", path = "changelog.html", source = "./CHANGELOG.md" }, + { title = "Examples", path = "examples.html", source = "./pages/examples.md"}, +] [dependencies] gleam_stdlib = ">= 0.44.0 and < 2.0.0" diff --git a/pages/examples.md b/pages/examples.md new file mode 100644 index 0000000..97a64a3 --- /dev/null +++ b/pages/examples.md @@ -0,0 +1,12 @@ +# tzif examples + +Within the examples directory are some simple examples of how to use the tzif +library. + +- [simple](https://github.com/devries/timezone/tree/reference-zones/examples/simple) + shows a program converting the current system time to the `America/New_York` + timezone and writing the result including the timezone designation. + +- [time_now](https://github.com/devries/timezone/tree/reference-zones/examples/time_now) + will iterate through the available timezones and print the current time in each + timezone available in the system timezone database. From d6706407cc62934d261eed4c5d9b02e9588695fe Mon Sep 17 00:00:00 2001 From: Christopher De Vries Date: Sat, 8 Aug 2026 15:31:58 -0400 Subject: [PATCH 6/8] Touch up changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48d525d..da44dca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## v1.1.3 - 2026-08-08 -- Add references to the zones gleam package with portable timezone data +- Add references to the zones gleam package with portable timezone data. +- Update documentation. ## v1.1.2 - 2025-11-01 - Fix issue with documentation. From 08f7246bd1c35f930bb7565f3d4c0713b93aef46 Mon Sep 17 00:00:00 2001 From: Christopher De Vries Date: Sat, 8 Aug 2026 15:32:20 -0400 Subject: [PATCH 7/8] update version number --- gleam.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gleam.toml b/gleam.toml index 95c3f44..94623e3 100644 --- a/gleam.toml +++ b/gleam.toml @@ -1,5 +1,5 @@ name = "tzif" -version = "1.1.2" +version = "1.1.3" # Fill out these fields if you intend to generate HTML documentation or publish # your project to the Hex package manager. From 90565798dff9ee3c1c9a2dfebc208c81d8339fb6 Mon Sep 17 00:00:00 2001 From: Christopher De Vries Date: Sat, 8 Aug 2026 15:36:33 -0400 Subject: [PATCH 8/8] update test file --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4a7fe22..af16219 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,8 +14,8 @@ jobs: - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: - otp-version: "27.1.2" - gleam-version: "1.12.0" + otp-version: "29" + gleam-version: "1.18.0" rebar3-version: "3" # elixir-version: "1" - run: gleam deps download