diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-30 18:37:03 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-30 18:37:03 +0200 |
commit | 8b426edf1b6d4de0ec825da8a34b1df7b51212db (patch) | |
tree | 7149e0f71ab49998d65ec95adfb1715490360bf0 /module/datetime/app.scm | |
parent | Add tzget script. (diff) | |
download | calp-8b426edf1b6d4de0ec825da8a34b1df7b51212db.tar.gz calp-8b426edf1b6d4de0ec825da8a34b1df7b51212db.tar.xz |
Update ical parts to use app context.
Diffstat (limited to '')
-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))))) |