diff --git a/gix-date/tests/time/format.rs b/gix-date/tests/time/format.rs index 06e5b8b774c..84c6cf0d166 100644 --- a/gix-date/tests/time/format.rs +++ b/gix-date/tests/time/format.rs @@ -81,6 +81,14 @@ fn git_default() { ); } +#[test] +fn bad_offset() { + assert_eq!( + time_bad_offset().format(gix_date::time::format::DEFAULT), + "Wed Jan 24 22:36:22 2018 -3407" + ); +} + fn time() -> Time { Time { seconds: 123456789, @@ -94,3 +102,10 @@ fn time_dec1() -> Time { offset: 9000, } } + +fn time_bad_offset() -> Time { + Time { + seconds: 1516956202, + offset: -122820, + } +}