chronotope / chrono-tz

TimeZone implementations for rust-chrono from the IANA database
Other
235 stars 56 forks source link

Fix deprecation warnings #138

Closed pitdicker closed 1 year ago

pitdicker commented 1 year ago

Avoid methods deprecated in recent chrono releases.

pitdicker commented 1 year ago

While working on this the error messages where surprisingly unhelpful:

---- tests::ambiguous_time_3 stdout ----
thread 'tests::ambiguous_time_3' panicked at 'assertion failed: `(left == right)`
  left: `2014-10-26T01:30:00MSK`,
 right: `2014-10-26T01:30:00MSK`', chrono-tz/src/lib.rs:348:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The timezone name MSK stays the same but the offset of the two dates was different.

djc commented 1 year ago

Thanks!

pitdicker commented 1 year ago

Forgot to run rustfmt on one of the commits, should be good now.