summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-06-25 23:53:05 +0200
committerTor Andersson <tor@ccxvii.net>2023-06-25 23:53:05 +0200
commitc50780f410146b5d3201da9a4e4a43049c95bed6 (patch)
tree2e4317dcb15933550e0368abea0baf52aee53247 /server.js
parentce182275027c3202a1fa4dcf6b0ed87ede79da37 (diff)
downloadserver-c50780f410146b5d3201da9a4e4a43049c95bed6.tar.gz
Parse strings as GMT for "human_date" formatting.
Diffstat (limited to 'server.js')
-rw-r--r--server.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.js b/server.js
index 89b92d6..078a5c6 100644
--- a/server.js
+++ b/server.js
@@ -210,7 +210,7 @@ function SLOG(socket, ...msg) {
function human_date(date) {
if (typeof date === 'string')
- date = julianday_from_epoch(Date.parse(date))
+ date = julianday_from_epoch(Date.parse(date + "Z"))
if (typeof date !== 'number')
return "never"
var days = julianday_from_epoch(Date.now()) - date