diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 712da94..b2b578d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,7 @@ use std::path::PathBuf; use std::str::FromStr; use anyhow::{anyhow, Error, Result}; -use chrono::{NaiveDateTime, Weekday}; +use chrono::{DateTime, TimeZone, Utc, Weekday}; use colored::Colorize; use itertools::Itertools; use log::debug; @@ -122,7 +122,7 @@ pub struct LogResult { /// The path to the log file. log_file: PathBuf, /// The time of the recording. - time: NaiveDateTime, + time: DateTime<Utc>, /// The numeric ID of the boss. boss_id: u16, /// The name of the boss. @@ -423,7 +423,7 @@ fn extract_info(entry: &DirEntry, log: &Log) -> LogResult { LogResult { log_file: entry.path().to_path_buf(), - time: NaiveDateTime::from_timestamp(i64::from(log.local_start_timestamp().unwrap_or(0)), 0), + time: Utc.timestamp(i64::from(log.local_start_timestamp().unwrap_or(0)), 0), boss_id: log.encounter_id(), boss_name, players, |