From 2ec2f2d4627b4cac830d5be2a93d1f8a0b6600d5 Mon Sep 17 00:00:00 2001 From: Mandragorat Wandystanu Date: Thu, 19 Nov 2020 22:55:05 +0100 Subject: [PATCH] Fix retrieval of timestamp --- byPeriodSlice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/byPeriodSlice.php b/byPeriodSlice.php index 84fcf6e..a94c1b8 100644 --- a/byPeriodSlice.php +++ b/byPeriodSlice.php @@ -75,7 +75,7 @@ $summary = []; foreach ($messages as $message) { $sender = trim($xpath->evaluate('substring-before(substring-after(normalize-space(div[@class = "hidden-xs"]/following-sibling::text()[1]), "By "), " ยท #")', $message), '"'); - $timestamp = $xpath->evaluate('substring-before(substring-after(.//script[@class = "timedisp"], "DisplayShortTime( "), " ,")', $message); + $timestamp = $xpath->evaluate('substring-before(substring-after(.//script[@class = "timedisp"], "DisplayShortTime("), ",")', $message); $date = new DateTime(null, $tz); $date->setTimestamp($timestamp / 1000000000);