Yamato-Security / hayabusa-evtx

A fork of the evtx Rust crate for Hayabusa
Apache License 2.0
6 stars 2 forks source link

Fix chrono v0.4.27 deprecated function warnings #37

Closed YamatoSecurity closed 1 year ago

YamatoSecurity commented 1 year ago

When upgrading to chrono v0.4.27, the following warnings happen:

warning: use of deprecated associated function `chrono::DateTime::<Tz>::from_utc`: Use TimeZone::from_utc_datetime() or DateTime::from_naive_utc_and_offset instead
  --> src/utils/time.rs:26:29
   |
26 |         return Ok(DateTime::from_utc(
   |                             ^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated associated function `chrono::DateTime::<Tz>::from_utc`: Use TimeZone::from_utc_datetime() or DateTime::from_naive_utc_and_offset instead
  --> src/utils/time.rs:35:18
   |
35 |     Ok(DateTime::from_utc(
   |                  ^^^^^^^^

warning: `evtx` (lib) generated 2 warnings