summaryrefslogtreecommitdiff
path: root/src/timedate/timedatectl.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-11-02 05:45:02 -1000
committerKay Sievers <kay@vrfy.org>2012-11-02 05:45:02 -1000
commite2fd5e5ba281a22886fa3797dc6265cca670448b (patch)
treef480e4553a5b5e53dd1e48afab3a5366411c8793 /src/timedate/timedatectl.c
parent62ffb3327ab100cb547c7fbed6f5ceea3d88c2ec (diff)
timedatectl: show "DST active: n/a" if no DST data is available
Diffstat (limited to 'src/timedate/timedatectl.c')
-rw-r--r--src/timedate/timedatectl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
index b7f2422a16..564f9e5f74 100644
--- a/src/timedate/timedatectl.c
+++ b/src/timedate/timedatectl.c
@@ -136,7 +136,9 @@ static void print_status_info(StatusInfo *i) {
r = time_get_dst(sec, "/etc/localtime",
&tc, &zc, &is_dstc,
&tn, &zn, &is_dstn);
- if (r >= 0) {
+ if (r < 0)
+ printf(" DST active: n/a\n");
+ else {
printf(" DST active: %s\n", yes_no(is_dstc));
t = tc - 1;