From 8b426edf1b6d4de0ec825da8a34b1df7b51212db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 30 Apr 2020 18:37:03 +0200 Subject: Update ical parts to use app context. --- module/datetime/app.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 module/datetime/app.scm (limited to 'module/datetime/app.scm') 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))))) -- cgit v1.2.3 From aa44c16ce953c090b2eb3ce580c60fa8934a7720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 30 Apr 2020 19:17:35 +0200 Subject: Change call signature for [gs]etf. --- module/datetime/app.scm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/datetime/app.scm') diff --git a/module/datetime/app.scm b/module/datetime/app.scm index 989a0847..9797ee39 100644 --- a/module/datetime/app.scm +++ b/module/datetime/app.scm @@ -5,12 +5,12 @@ :use-module (datetime zic)) (define-method (init-app) - (setf app 'zoneinfo + (setf 'zoneinfo (let* ((pipe - (-> (@ (global) basedir) - dirname - (string-append "/tzget") - ((@ (ice-9 popen) open-input-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 -- cgit v1.2.3