Browse code
feat: improve timezone initing behavior
Edward Langley authored on 05/05/2023 06:20:19
Showing 1 changed files
Showing 1 changed files
... | ... |
@@ -66,8 +66,10 @@ |
66 | 66 |
(let ((tz-inited nil)) |
67 | 67 |
(flet ((init-tz () |
68 | 68 |
(unless tz-inited |
69 |
- (local-time:reread-timezone-repository) |
|
70 |
- (setf tz-inited t)))) |
|
69 |
+ (handler-case (local-time:find-timezone-by-location-name "America/Los_Angeles") |
|
70 |
+ (error () |
|
71 |
+ (local-time:reread-timezone-repository) |
|
72 |
+ (setf tz-inited t)))))) |
|
71 | 73 |
|
72 | 74 |
(macrolet ((ensure-tz-inited (&body body) |
73 | 75 |
`(progn (init-tz) |