aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel <kingdread@gmx.de>2020-05-01 12:57:58 +0200
committerDaniel <kingdread@gmx.de>2020-05-01 12:57:58 +0200
commit811d7e62695c5c12aecd08b176c4ead641e2ad2c (patch)
treea19040c194d414ea0f6bcc54cf0d485cd9c0fe47
parentcb757209d438afe23b5bdbfa5f62d00b195ad367 (diff)
downloadraidgrep-811d7e62695c5c12aecd08b176c4ead641e2ad2c.tar.gz
raidgrep-811d7e62695c5c12aecd08b176c4ead641e2ad2c.tar.bz2
raidgrep-811d7e62695c5c12aecd08b176c4ead641e2ad2c.zip
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.
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
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,