diff options
author | Daniel Mack <github@zonque.org> | 2015-08-21 06:20:45 +0200 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-08-21 06:20:45 +0200 |
commit | 9dba039e1c1734bd598343320bfa7a6d975473e6 (patch) | |
tree | f88c20a432cc80dcc23bc56f0f3e9ee3d117d67d /src | |
parent | 0d43ffef5ad277183ebaef259b2210bfaf913749 (diff) | |
parent | bdeb9e603ab3f43d0d39f27ce6272f1114a4ee96 (diff) |
Merge pull request #995 from poettering/timedate-utc
timedatectl: when no timezone is set consider UTC the default
Diffstat (limited to 'src')
-rw-r--r-- | src/timedate/timedatectl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c index 8ec6adb493..1c3f03c803 100644 --- a/src/timedate/timedatectl.c +++ b/src/timedate/timedatectl.c @@ -96,7 +96,7 @@ static void print_status_info(const StatusInfo *i) { old_tz = strdupa(tz); /* Set the new $TZ */ - if (i->timezone && setenv("TZ", i->timezone, true) < 0) + if (setenv("TZ", isempty(i->timezone) ? "UTC" : i->timezone, true) < 0) log_warning_errno(errno, "Failed to set TZ environment variable, ignoring: %m"); else tzset(); |