Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuxiujia committed Sep 3, 2024
1 parent 6a31da3 commit 80f781b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,7 @@ fn test_parse_micro() {

#[test]
fn test_ser_date() {
let mut date = DateTime::from_str("2023-10-13 16:57:41.123926+08:00").unwrap();
date = date.set_offset(8 * 3600);
let date = DateTime::from_str("2023-10-13 16:57:41.123926+08:00").unwrap();
let js = serde_json::to_string(&date).unwrap();
assert_eq!(js, "\"2023-10-13T16:57:41.123926+08:00\"");
}
Expand Down

0 comments on commit 80f781b

Please sign in to comment.