diff options
author | Kay Sievers <kay@vrfy.org> | 2012-11-11 16:55:25 +0100 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-11-11 16:55:25 +0100 |
commit | 2311eb2ff0c3ff80ec3645b02c97170c9a565454 (patch) | |
tree | 8917f61a335195ffbbfe2bc6457757c29e6f0742 /src/shared/time-dst.c | |
parent | ef216ca3d7ddc00c629fbbc37dd1e7f98f9e9220 (diff) |
timedatectl: properly print 30 minutes DST transitions
Diffstat (limited to 'src/shared/time-dst.c')
-rw-r--r-- | src/shared/time-dst.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shared/time-dst.c b/src/shared/time-dst.c index df5f15151d..afc893cccc 100644 --- a/src/shared/time-dst.c +++ b/src/shared/time-dst.c @@ -83,7 +83,7 @@ static inline int64_t decode64(const void *ptr) { int time_get_dst(time_t date, const char *tzfile, time_t *switch_cur, char **zone_cur, bool *dst_cur, - time_t *switch_next, char **zone_next, bool *dst_next) { + time_t *switch_next, int *delta_next, char **zone_next, bool *dst_next) { time_t *transitions = NULL; size_t num_transitions = 0; unsigned char *type_idxs = 0; @@ -321,8 +321,11 @@ found: *zone_cur = strdup(&zone_names[types[type_idxs[i - 1]].idx]); if (dst_cur) *dst_cur = types[type_idxs[i-1]].isdst; + if (switch_next) *switch_next = transitions[i]; + if (delta_next) + *delta_next = (types[type_idxs[i]].offset - types[type_idxs[i-1]].offset) / 60; if (zone_next) *zone_next = strdup(&zone_names[types[type_idxs[i]].idx]); if (dst_next) |