blob: 9ec883e20b57d1e3a8d772aa5be91c86a4f7903c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
(define-module (datetime instance)
:use-module (util)
:use-module (ice-9 rdelim)
:use-module (datetime zic)
:export (zoneinfo))
;; TODO see (vcomponent instance), this has a similar problem with early load
(define-once
zoneinfo
(let* ((pipe
(-> (@ (global) basedir)
dirname
(string-append "/tzget")
((@ (ice-9 popen) open-input-pipe))))
(path (read-line pipe))
(names (string-split (read-line pipe) #\space)))
(read-zoneinfo
(map (lambda (s) (string-append path file-name-separator-string s))
names))))
|