Skip to content

Commit

Permalink
Update dependencies and fix some bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
gudaoxuri committed Oct 23, 2023
1 parent 49db267 commit 7d6cca2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tardis/tests/test_basic_json.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use chrono::{DateTime, TimeZone, Utc};
use chrono::{DateTime, Utc};
use serde::Deserializer;
use std::fs;
use tardis::basic::dto::TardisContext;
Expand Down Expand Up @@ -188,7 +188,7 @@ where
D: Deserializer<'de>,
{
let s = String::deserialize(deserializer)?;
Utc.parse_from_str(&s, "%Y-%m-%d %H:%M:%S").map_err(serde::de::Error::custom)
DateTime::parse_from_str(&s, "%Y-%m-%d %H:%M:%S").map(|date| date.with_timezone(&Utc)).map_err(serde::de::Error::custom)
}

#[derive(Serialize, Deserialize)]
Expand Down

0 comments on commit 7d6cca2

Please sign in to comment.