[systemd-devel] [PATCH] timedatectl: check for getenv("TZDIR")
Shawn Landden
shawn at churchofgit.com
Tue Mar 24 12:02:23 PDT 2015
I liked having the DST information. It is a pity glibc doesn't export
this information.
v3
---
src/timedate/timedatectl.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
index ab5c8a1..d529a0a 100644
--- a/src/timedate/timedatectl.c
+++ b/src/timedate/timedatectl.c
@@ -88,6 +88,11 @@ static void print_status_info(const StatusInfo *i) {
unsetenv("TZ");
}
+ if (getenv("TZDIR")) {
+ fprintf(stderr, "Warning: Ignoring the TZDIR variable.\n\n");
+ unsetenv("TZDIR");
+ }
+
r = setenv("TZ", i->timezone, false);
if (r < 0) {
log_error_errno(errno, "Failed to set TZ environment variable: %m");
--
2.2.1.209.g41e5f3a
More information about the systemd-devel
mailing list