aboutsummaryrefslogtreecommitdiff
path: root/tw/system.scm
diff options
context:
space:
mode:
authorTimo Wilken2024-03-27 16:49:28 -0500
committerTimo Wilken2024-03-27 16:49:28 -0500
commitb992616be8836b5675e50c944b7eea451074ef20 (patch)
tree0998492ac73d91382fd2a6e7c51bf794d1f93202 /tw/system.scm
parent96665c7bcf472f647d7ce119b79873afa59a5f65 (diff)
Set timezone in addition to localtime
Diffstat (limited to 'tw/system.scm')
-rw-r--r--tw/system.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/tw/system.scm b/tw/system.scm
index 58703e99..4cbd6dda 100644
--- a/tw/system.scm
+++ b/tw/system.scm
@@ -125,6 +125,7 @@
(with-extensions (list guile-json-4 guile-gnutls) ; guile-gnutls needed by (web client)
#~(begin
(use-modules ((srfi srfi-11) #:select (let-values))
+ ((ice-9 ports) #:select (call-with-output-file))
((ice-9 textual-ports) #:select (get-string-all))
(ice-9 format)
(json)
@@ -149,6 +150,10 @@
(zonefile (string-append #$tzdata "/share/zoneinfo/" timezone)))
(delete-file "/etc/localtime")
(symlink zonefile "/etc/localtime")
+ (call-with-output-file "/etc/timezone"
+ (lambda (port)
+ (display timezone port)
+ (newline port)))
(format (current-error-port)
"Updated timezone to ~a: success~%" timezone))))))))