chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
timedatectl: show "DST active: n/a" if no DST data is available
[elogind.git]
/
src
/
timedate
/
timedatectl.c
diff --git
a/src/timedate/timedatectl.c
b/src/timedate/timedatectl.c
index b7f2422a16ee2172318e2a70b28ebe578dc4d689..564f9e5f74eddd77712f0398556dfe83351cb5e2 100644
(file)
--- 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);
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;
printf(" DST active: %s\n", yes_no(is_dstc));
t = tc - 1;