Skip to content

Commit

Permalink
Add tests/issues.rs, test Issue chronotope#1096
Browse files Browse the repository at this point in the history
  • Loading branch information
jtmoon79 committed May 28, 2023
1 parent 656c941 commit 171c02a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/issues.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// issues.rs
//
// Regressions tests specific issues.

#[cfg(test)]
use chrono::{
TimeZone,
Local,
Datelike,
NaiveDate,
NaiveDateTime,
Timelike,
};

#[test]
/// For https://github.com/chronotope/chrono/issues/1096
fn issue_1096() {
let test = NaiveDateTime::from_timestamp_millis(0).unwrap();
let tf = test.format("%+");
let output = tf.to_string();
assert_eq!(output, "1970-01-01T00:00:00.00000+00:00");
}

0 comments on commit 171c02a

Please sign in to comment.