Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to [2023a] #169

Merged
merged 1 commit into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Changes between the versions

### 0.5.4 (2023-03-24)

* Update to Time Zone Database release [2023a](https://mm.icann.org/pipermail/tz-announce/2023-March/000077.html)
* Remove "etc/localtime" as it should not be part of this library

### 0.5.3 (2023-01-01)

* No need to use `unsafe` functions
Expand All @@ -10,26 +15,26 @@

### 0.5.1 (2022-11-30)

* Update to Time Zone Database release [Time Zone Database 2022g](https://mm.icann.org/pipermail/tz-announce/2022-November/000076.html)
* Update to Time Zone Database release [2022g](https://mm.icann.org/pipermail/tz-announce/2022-November/000076.html)

### 0.5.0 (2022-11-24)

* Release v0.5.0

#### 0.5.0-pre.4 (2022-10-29)

* Update to Time Zone Database release [Time Zone Database 2022f](https://mm.icann.org/pipermail/tz-announce/2022-October/000075.html)
* Update to Time Zone Database release [2022f](https://mm.icann.org/pipermail/tz-announce/2022-October/000075.html)
* Use `edition = "2021"`

#### 0.5.0-pre.3 (2022-10-12)

* Remove `utcnow` integration
* Simplify by removing `no_std` support
* Update to Time Zone Database release [Time Zone Database 2022e](https://mm.icann.org/pipermail/tz-announce/2022-October/000074.html)
* Update to Time Zone Database release [2022e](https://mm.icann.org/pipermail/tz-announce/2022-October/000074.html)

#### 0.5.0-pre.2 (2022-09-25)

* Update to Time Zone Database release [Time Zone Database 2022d](https://mm.icann.org/pipermail/tz-announce/2022-September/000073.html)
* Update to Time Zone Database release [2022d](https://mm.icann.org/pipermail/tz-announce/2022-September/000073.html)
* Update to iana-time-zone 0.1.50

#### 0.5.0-pre.1 (2022-09-14)
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tzdb"
version = "0.5.3"
version = "0.5.4"
edition = "2018"
authors = ["René Kijewski <[email protected]>"]
repository = "https://github.com/Kijewski/tzdb"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DELETE_ON_ERROR:

TZDB_VERSION := tzdb-2022g
TZDB_VERSION := tzdb-2023a

src/generated/mod.rs: tmp/${TZDB_VERSION}/usr/share/zoneinfo/
cargo r --package make-tzdb --bin make-tzdb -- $(@D) $< tzdb.tar.lz.sha
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Static time zone information for [tz-rs](https://crates.io/crates/tz-rs).

This crate provides all time zones found in the [Time Zone Database](https://www.iana.org/time-zones),
currently in the version 2022g (released 2022-11-29).
currently in the version 2023a (released 2023-02-22).

See the documentation for a full list the the contained time zones:
<https://docs.rs/tzdb/latest/tzdb/time_zone/index.html>
Expand Down
18 changes: 12 additions & 6 deletions make-tzdb/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,13 @@ pub fn main() -> anyhow::Result<()> {
let mut folders = vec![];
for entry in read_dir(&base_path)?.filter_map(|f| f.ok()) {
let name = entry.file_name();
let name = match name.to_str() {
Some(name) if !name.contains('.') => name,
_ => continue,
let Some(name) = name.to_str() else {
continue;
};
if !name.is_ascii() || name.contains('.') || !name.as_bytes()[0].is_ascii_uppercase() {
continue;
}

if entry.file_type().map(|f| f.is_dir()).unwrap_or_default() {
folders.push(name.to_owned());
continue;
Expand All @@ -138,10 +141,13 @@ pub fn main() -> anyhow::Result<()> {
for folder in folders {
for entry in read_dir(format!("{}/{}", base_path, folder))?.filter_map(|f| f.ok()) {
let name = entry.file_name();
let name = match name.to_str() {
Some(name) if !name.contains('.') => name,
_ => continue,
let Some(name) = name.to_str() else {
continue;
};
if !name.is_ascii() || name.contains('.') || !name.as_bytes()[0].is_ascii_uppercase() {
continue;
}

if let Ok(bytes) = std::fs::read(format!("{}/{}/{}", &base_path, &folder, name)) {
if TimeZone::from_tz_data(&bytes).is_ok() {
let tz_entry = TzName::new(Some(folder.as_str()), name);
Expand Down
2 changes: 1 addition & 1 deletion src/generated
Submodule generated updated from 41053e to 66030a
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
//! Static time zone information for [tz-rs](https://crates.io/crates/tz-rs).
//!
//! This crate provides all time zones found in the [Time Zone Database](https://www.iana.org/time-zones),
//! currently in the version 2022g (released 2022-11-29).
//! currently in the version 2023a (released 2023-02-22).
//!
//! See the documentation for a full list the the contained time zones:
//! <https://docs.rs/tzdb/latest/tzdb/time_zone/index.html>
Expand Down
2 changes: 1 addition & 1 deletion tzdb.tar.lz.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f471046189f519de5735ac2d8c3edb27cbe925247b06f44634e700e5e4453ec5f715d85256fc74d300bcdaa070a7600fcc054327f2dfe743ab3c0fe404ff83c1 tmp/tzdb-2022g.tar.lz
8e959f6cad84e9481ed5a6efcc8d7126d41fadfdc860715fea87fb15f7dcfdbc4c9d49828df2945ee9304dbdd3370c5b5048c62637bdd4f4962830ba101008bd tmp/tzdb-2023a.tar.lz