blob: 9797ee394bf847d427a199a7f1bfcad65ea067ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
(define-module (datetime app)
:use-module (util)
:use-module (util app)
:use-module (ice-9 rdelim)
:use-module (datetime zic))
(define-method (init-app)
(setf '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)))))
|