Skip to content

Commit

Permalink
fix IST, WIB timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
yanganto committed Oct 1, 2024
1 parent 7506b73 commit 5c35096
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "test-with"
version = "0.14.2"
version = "0.14.3"
authors = ["Antonio Yang <[email protected]>"]
edition = "2021"
license = "MIT"
Expand Down
11 changes: 7 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2937,16 +2937,19 @@ fn check_timezone(attr_str: &String) -> (bool, Vec<&str>) {
"KST" | "JST" => Ok(9 * 60),
"HKT" | "WITA" | "AWST" => Ok(8 * 60),
"PST" => abort_call_site!("PST can be GMT+8 or GMT-8, please use +8 or -8 instead"),
"WIB" => Ok(7),
"WIB" => Ok(7 * 60),
"CST" => abort_call_site!("PST can be GMT+8 or GMT-6, please use +8 or -6 instead"),
"IST" => Ok(5 * 60 + 30),
"5.5" | "+5.5" => Ok(5 * 60 + 30),
"IST" => abort_call_site!(
"IST can be GMT+5.5, GMT+2 or GMT+1, please use +5.5, 2 or 1 instead"
),
"PKT" => Ok(5 * 60),
"EAT" | "EEST" | "IDT" | "MSK" => Ok(3 * 60),
"CAT" | "EET" | "CEST" | "SAST" => Ok(2 * 60),
"CET" | "WAT" | "WEST" | "BST" => Ok(1 * 60),
"UTC" | "GMT" | "WET" => Ok(0),
"NDT" => Ok(-2 * 60 - 30),
"NST" => Ok(-3 * 60 - 30),
"NDT" | "-2.5" => Ok(-2 * 60 - 30),
"NST" | "-3.5" => Ok(-3 * 60 - 30),
"ADT" => Ok(-3 * 60),
"AST" | "EDT" => Ok(-4 * 60),
"EST" | "CDT" => Ok(-5 * 60),
Expand Down

0 comments on commit 5c35096

Please sign in to comment.