diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-11-04 17:08:38 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-11-05 11:21:25 +0100 |
commit | 4080b0c7e97acb7357a7ab85589b324e382e0d47 (patch) | |
tree | 3ed5e38c94ee306311d497cda397cab38d173e73 /module/vcomponent/recurrence/generate.scm | |
parent | Further cleanup in (vcomponent). (diff) | |
download | calp-4080b0c7e97acb7357a7ab85589b324e382e0d47.tar.gz calp-4080b0c7e97acb7357a7ab85589b324e382e0d47.tar.xz |
Add let-env.
Diffstat (limited to '')
-rw-r--r-- | module/vcomponent/recurrence/generate.scm | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/module/vcomponent/recurrence/generate.scm b/module/vcomponent/recurrence/generate.scm index 50ce83e5..3988141c 100644 --- a/module/vcomponent/recurrence/generate.scm +++ b/module/vcomponent/recurrence/generate.scm @@ -44,13 +44,8 @@ ;; Specifically, 23h or 25h when going between summer and "normal" time. (define (next-event ev r) - (let ((e (copy-vcomponent ev)) - (tz (getenv "TZ"))) - ;; (setenv "TZ" (car (prop (attr* e 'DTSTART) 'TZID))) - (aif (prop (attr* e 'DTSTART) 'TZID) - (setenv "TZ" (car it)) - ;; Should missing be this, or explicitly GMT? - (unsetenv "TZ")) + (let ((e (copy-vcomponent ev))) + (let-env ((TZ (and=> (prop (attr* e 'DTSTART) 'TZID) car)))) (let ((d (time-utc->date (attr e 'DTSTART))) (i (interval r))) @@ -72,8 +67,6 @@ (set! (attr e 'DTEND) (add-duration (attr e 'DTSTART) (attr e 'DURATION)))) - (setenv "TZ" tz) - e)) #; |