aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent/recurrence/generate.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/vcomponent/recurrence/generate.scm')
-rw-r--r--module/vcomponent/recurrence/generate.scm11
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))
#;