Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Kijewski committed Mar 27, 2022
1 parent b6a4fbf commit c09a808
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 24 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Changes between the versions

### 0.2.1

* Fix typos
* Introduce VERSION and VERSION_HASH

### 0.2.0

* Update to 2022a
Expand Down
22 changes: 12 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions 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 2022e (released 2022-03-15).
currently in the version 2022a (released 2022-03-15).

See the documentation for a full list the the contained time zones:
<https://docs.rs/tzdb/latest/tzdb/time_zone/index.html>
Expand All @@ -29,12 +29,13 @@ DateTime::now(tz_by_name("ArCtIc/LongYeArByEn").unwrap());

## Feature flags

* `by-name` *(enabled by default)* — enables TimeZoneExt::from_db() to get a time zone at runtime by name
* `list` *(enabled by default)* — enables TimeZoneExt::names_in_db() to get a list of all shipped time zones
* `local` *(enabled by default)* — enables TimeZoneExt::local_from_db() to get the system time zone
* `by-name` *(enabled by default)* — enables tz_by_name() to get a time zone at runtime by name
* `list` *(enabled by default)* — enables TZ_NAMES to get a list of all shipped time zones
* `local` *(enabled by default)* — enables local_tz() to get the system time zone
* `serde-as` — enables the module `serde_as` to (de)serialize (Utc)DateTimes with serde
* `binary` – make the unparsed, binary tzdata of a time zone available

## Git Cloning
## Git cloning

To clone / fork the Git repo you need to have [git-lfs](https://git-lfs.github.com/) installed.
The `main` branch gets squashed regularily to keep the size of the repository at a maintainable size.
To get the history until then, please refer to the id in the initial commit.
2 changes: 1 addition & 1 deletion make-tzdb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ itertools = "0.10.3"
phf_codegen = "0.10.0"
ron = "0.7.0"
serde = { version = "1.0.136", features = ["derive"] }
tz-rs = "0.6.5"
tz-rs = "0.6.7"
1 change: 0 additions & 1 deletion tzdb-2021e.tar.lz.sha

This file was deleted.

7 changes: 3 additions & 4 deletions tzdb/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tzdb"
version = "0.2.0"
version = "0.2.1"
edition = "2021"
authors = ["René Kijewski <[email protected]>"]
repository = "https://github.com/Kijewski/tzdb"
Expand All @@ -12,11 +12,10 @@ readme = "README.md"
rust-version = "1.57"

[dependencies]
tz-rs = "0.6.5"
tz-rs = "0.6.7"

# optional dependencies
byte-slice-cast = { version = "1.2.1", optional = true }
document-features = { version = "=0.2.1", optional = true }
iana-time-zone = { version = "0.1.31", optional = true }
phf = { version = "0.10.1", optional = true }
serde = { version = "1.0.136", default-features = false, optional = true }
Expand Down Expand Up @@ -44,7 +43,7 @@ serde-as = ["serde", "serde_with"]
binary = []

# Internal feature, used when generating docs. *You* are not supposed to enable this feature!
docsrs = ["document-features", "testing"]
docsrs = ["testing"]

# Internal feature, used when testing.
testing = ["serde-as", "serde/derive", "serde_with/macros", "binary"]
Expand Down
22 changes: 20 additions & 2 deletions tzdb/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 2022e (released 2022-03-15).
//! currently in the version 2022a (released 2022-03-15).
//!
//! See the documentation for a full list the the contained time zones:
//! <https://docs.rs/tzdb/latest/tzdb/time_zone/index.html>
Expand All @@ -63,12 +63,24 @@
//! ```
//!
//! ## Feature flags
#![cfg_attr(feature = "docsrs", doc = ::document_features::document_features!())]
//!
//! * `by-name` *(enabled by default)* — enables [`tz_by_name()`] to get a time zone at runtime by name
//!
//! * `list` *(enabled by default)* — enables [`TZ_NAMES`] to get a list of all shipped time zones
//!
//! * `local` *(enabled by default)* — enables [`local_tz()`] to get the system time zone
//!
//! * `serde-as` — enables the module [`serde_as`] to (de)serialize (Utc)DateTimes with [serde]
//!
//! * `binary` – make the unparsed, binary tzdata of a time zone available
//!
mod generated;
#[cfg(feature = "serde-as")]
pub mod serde_as;

#[cfg(feature = "docsrs")]
use serde;
use tz::TimeZoneRef;

pub use crate::generated::time_zone;
Expand All @@ -78,6 +90,12 @@ pub mod changelog {
#![doc = include_str!("../CHANGELOG.md")]
}

/// The version of the source Time Zone Database
pub const VERSION: &str = "2022a";

/// The SHA512 hash of the source Time Zone Database (using the "Complete Distribution")
pub const VERSION_HASH: &str = "ece0b7a9ad3d365f8605e8f98a8a78b7fdbbb8aa615b585f21256d9401c59845fcdc951f5fc876293f1b7956b1a2d3fa2baf85099d637a91d4199ee30cf4307e";

/// Find a time zone by name, e.g. `"Europe/Berlin"` (case-insensitive)
#[cfg(feature = "by-name")]
#[cfg_attr(
Expand Down

0 comments on commit c09a808

Please sign in to comment.