Skip to content

Commit 751c683

Browse files
committed
Fix to use local zone for time presentation in /resume.
1 parent afd7a19 commit 751c683

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
- Fix regression in `/compact` command.
6+
- Fix to use local zone for time presentation in `/resume`.
67

78
## 0.71.1
89

src/eca/shared.clj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
(:import
99
[java.net URI]
1010
[java.nio.file Paths]
11-
[java.time ZoneOffset]
12-
[java.time.format DateTimeFormatter]
13-
[java.time Instant]))
11+
[java.time Instant ZoneId ZoneOffset]
12+
[java.time.format DateTimeFormatter]))
1413

1514
(set! *warn-on-reflection* true)
1615

@@ -182,6 +181,7 @@
182181
(apply mf file (safe-mtime file) args)))))
183182

184183
(defn ms->presentable-date [^Long ms ^String pattern]
185-
(when ms
186-
(.format (.atOffset (Instant/ofEpochMilli ms) ZoneOffset/UTC)
184+
(when ms
185+
(.format (.atZoneSameInstant (.atOffset (Instant/ofEpochMilli ms) ZoneOffset/UTC)
186+
(ZoneId/systemDefault))
187187
(DateTimeFormatter/ofPattern pattern))))

0 commit comments

Comments
 (0)