Skip to content

Commit

Permalink
fix deprecated function problem
Browse files Browse the repository at this point in the history
Signed-off-by: sonichen <[email protected]>
  • Loading branch information
sonichen committed Sep 13, 2023
1 parent 97dca0c commit a05cd8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/git_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,9 @@ pub fn parse_date_to_datetime(input: &str, mytype: &str) -> Result<DateTime<Utc>
}

let datetime = NaiveDateTime::new(date, time);
let datetime_utc = DateTime::from_utc(datetime, Utc);
// let datetime_utc = DateTime::from_utc(datetime, Utc);
let datetime_utc = DateTime::from_naive_utc_and_offset(datetime, Utc);

Ok(datetime_utc)
}

Expand Down

0 comments on commit a05cd8b

Please sign in to comment.