Timothy Sample writes: > Hi, > > Kei Kebreau writes: > >> Marius Bakke writes: >> >>> I'm not sure what we should do about it. Thoughts? >>> >>> Kei: Does it work if you 'echo Your/Timezone > /etc/timezone' ? >>> Alternatively, you could make /etc/localtime a symbolic link to >>> $tzdata/share/zoneinfo/Your/Timezone, though that will not persist a >>> reboot. >> >> I can confirm that both of these methods work, so crude work-arounds >> include >> >> 1. Setting the system's configured time zone in /etc/timezone > > This is my vote for two reasons. First, it seems more elegant. If I > want to know the timezone name, I should look it up directly, and not > chase symlinks around looking for some canonical timezone file. I think > this is the closest thing to a “standard way to get the name of the > system timezone” (here, > “standard” means “well, I guess at least Gentoo does it”). Second, it > is a one-liner for us: > > From ad931895edae97e2d6d77542fcbe8dc793f193f0 Mon Sep 17 00:00:00 2001 > From: Timothy Sample > Date: Tue, 16 Jul 2019 10:04:58 -0400 > Subject: [PATCH] system: Write the timezone to /etc/timezone. > > * gnu/system.scm (operating-system-etc-service): Write the operating > system timezone to /etc/timezone. > > Fixes . > --- > gnu/system.scm | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/gnu/system.scm b/gnu/system.scm > index 01be1243fe..75ac0632bb 100644 > --- a/gnu/system.scm > +++ b/gnu/system.scm > @@ -716,6 +716,7 @@ fi\n"))) > ;; to certain networks. Some discussion at > ;; https://lists.gnu.org/archive/html/help-guix/2017-09/msg00037.html > ("hostname" ,(plain-file "hostname" (operating-system-host-name os))) > + ("timezone" ,(plain-file "timezone" (operating-system-timezone os))) > ("localtime" ,(file-append tzdata "/share/zoneinfo/" > (operating-system-timezone os))) > ("sudoers" ,(operating-system-sudoers-file os)))))) > -- > 2.22.0 > > > Thoughts? Looks good to me. Perhaps leave a comment that Glib uses this file to figure out the current timezone? Though I notice Debian 10 creates /etc/timezone too, so maybe we just missed a FHS update somewhere.