diff options
Diffstat (limited to 'module/datetime/app.scm')
-rw-r--r-- | module/datetime/app.scm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/module/datetime/app.scm b/module/datetime/app.scm new file mode 100644 index 00000000..989a0847 --- /dev/null +++ b/module/datetime/app.scm @@ -0,0 +1,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 app '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))))) |