Skip to content

Commit

Permalink
edit test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuxiujia committed Aug 29, 2024
1 parent e73d420 commit 6a31da3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -589,12 +589,11 @@ fn test_ser_date() {


#[test]
fn test_offset_href(){
fn test_display_href(){
//5*3600 + 3600/2
let mut date = DateTime::from_str("2023-10-13 16:57:41.123926+08:00").unwrap();
date = date.set_offset(5*3600 + 3600/2);
let date = DateTime::from_str("2023-10-13 16:57:41.123926+05:30").unwrap();
let js = serde_json::to_string(&date).unwrap();
assert_eq!(js, "\"2023-10-13T14:27:41.123926+05:30\"");
assert_eq!(js, "\"2023-10-13T16:57:41.123926+05:30\"");
}

#[test]
Expand Down

0 comments on commit 6a31da3

Please sign in to comment.