You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
panic in ZonedDateTime::strptime when parsing a time string very near boundary, with a timezone offset #718
I verified this repros on the 1.01 release, and the latest trunk (1672f05)
test 1:
thread 'test_zdt_01' (3713135) panicked at /z/jiff-1.0.1/src/fmt/strtime/mod.rs:1543:54:
called `Result::unwrap()` on an `Err` value: error converting datetime to instant in time zone Asia/Tokyo: converting datetime with time zone offset `+09` to timestamp overflowed: parameter 'Unix timestamp seconds' is not in the required range of -377705023201..=253402207200
test 2:
thread 'test_zdt_02' (3713136) panicked at /z/jiff-1.0.1/src/fmt/strtime/mod.rs:1543:54:
called `Result::unwrap()` on an `Err` value: error converting datetime to instant in time zone America/New_York: converting datetime with time zone offset `-04:56:02` to timestamp overflowed: parameter 'Unix timestamp seconds' is not in the required range of -377705023201..=253402207200
It looks to be the code here, and I assume the unwrap() is not guaranteed to pass in the case of overflow:
Activity
fix: `ZonedDateTime::strptime` could panic on inputs near boundaries (B…