From 811d7e62695c5c12aecd08b176c4ead641e2ad2c Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 1 May 2020 12:57:58 +0200 Subject: use log end timestamp instead of start They are usually within minutes of each other, but this has two advantages: 1. The output is consistent with the filename (and probably the file creation date, if it has been preserved) 2. Due to 1., this means we can use the filename to get the timestamp faster than parsing the file. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index b2b578d..db2a5e7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -423,7 +423,7 @@ fn extract_info(entry: &DirEntry, log: &Log) -> LogResult { LogResult { log_file: entry.path().to_path_buf(), - time: Utc.timestamp(i64::from(log.local_start_timestamp().unwrap_or(0)), 0), + time: Utc.timestamp(i64::from(log.local_end_timestamp().unwrap_or(0)), 0), boss_id: log.encounter_id(), boss_name, players, -- cgit v1.2.3