diff options
Diffstat (limited to 'ebuild-mode.el')
-rw-r--r-- | ebuild-mode.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ebuild-mode.el b/ebuild-mode.el index 05fb011..5908b7f 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -316,9 +316,10 @@ Compatibility function for XEmacs." ;; as third argument, but accepts non-nil to mean Universal Time. (let ((process-environment (copy-sequence process-environment)) (tz (getenv "TZ"))) - (setenv "TZ" "UTC") (unwind-protect - (format-time-string format-string time) + (progn + (setenv "TZ" "UTC") + (format-time-string format-string time)) ;; This is needed because setenv handles TZ specially. ;; So, restoring the environment is not enough. (setenv "TZ" tz))) |