Skip to content

Commit

Permalink
Update to tzdb 2022b (#107)
Browse files Browse the repository at this point in the history
* Update to tzdb 2022b

* https://github.com/eggert/tz/releases/tag/2022b
* https://mm.icann.org/pipermail/tz-announce/2022-August/000071.html

Remove test for Europe/Amsterdam which is no longer included by default.
  • Loading branch information
Kijewski authored Aug 12, 2022
1 parent b522fcf commit 04cf6d4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
18 changes: 0 additions & 18 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ mod tests {
use super::America::Danmarkshavn;
use super::Asia::Dhaka;
use super::Australia::Adelaide;
use super::Europe::Amsterdam;
use super::Europe::Berlin;
use super::Europe::London;
use super::Europe::Moscow;
Expand Down Expand Up @@ -334,23 +333,6 @@ mod tests {
assert_eq!(after, Tahiti.ymd(1912, 10, 1).and_hms(0, 58, 16));
}

#[test]
fn second_offsets() {
let dt = UTC.ymd(1914, 1, 1).and_hms(13, 40, 28).with_timezone(&Amsterdam);
assert_eq!(dt.to_string(), "1914-01-01 14:00:00 AMT");

// NOTE: pytz will give a different result here. The actual offset is +00:19:32.
// The implementation of RFC3339 formatting in chrono rounds down the
// number of minutes, whereas pytz rounds to nearest in cases such as this.
// RFC3339 specifies that precision is not required in this case, and that
// to retain precision, the time should be converted to a representable
// format.
// In any case, the actual datetime objects themselves always retain full
// precision in this implementation (unlike pytz). It is only (some) string
// representations that lack precision.
assert_eq!(dt.to_rfc3339(), "1914-01-01T14:00:00+00:19");
}

#[test]
#[should_panic]
fn nonexistent_time() {
Expand Down
2 changes: 1 addition & 1 deletion tz
Submodule tz updated 32 files
+119 −41 Makefile
+114 −3 NEWS
+9 −39 africa
+2 −28 antarctica
+6 −22 asctime.c
+163 −175 asia
+26 −81 australasia
+12 −6 backward
+514 −0 backzone
+2 −2 calendars
+5 −18 date.c
+6 −2 etcetera
+90 −384 europe
+4 −4 leap-seconds.list
+0 −0 leapseconds.awk
+60 −51 localtime.c
+13 −8 northamerica
+72 −59 private.h
+45 −14 southamerica
+12 −22 strftime.c
+9 −5 theory.html
+19 −10 tz-how-to.html
+5 −2 tz-link.html
+7 −7 tzfile.h
+13 −3 tzselect.8
+7 −7 zdump.c
+42 −15 zic.8
+290 −186 zic.c
+205 −31 ziguard.awk
+50 −12 zishrink.awk
+2 −2 zone.tab
+15 −36 zone1970.tab

0 comments on commit 04cf6d4

Please sign in to comment.