summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-22 16:16:05 +0100
committerLennart Poettering <lennart@poettering.net>2016-02-22 16:16:05 +0100
commita4ae7f1d739cc011b5312a8bfba99971bce0e7c3 (patch)
tree649c907667350b80e926e8f34d04d567a8fb34aa /src/basic
parent83ea2049fcd3a15071b5519624269266e31d9906 (diff)
parenta022d76e6a7c711954be5535e6308d0a470e232a (diff)
Merge pull request #2695 from mustrumr/fix-calendarspec-skip
calendarspec: fix find_next skipping times
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/calendarspec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/calendarspec.c b/src/basic/calendarspec.c
index 00fc39a499..2f40ba2b46 100644
--- a/src/basic/calendarspec.c
+++ b/src/basic/calendarspec.c
@@ -1029,7 +1029,7 @@ static int find_next(const CalendarSpec *spec, struct tm *tm, usec_t *usec) {
r = find_matching_component(spec->hour, &c.tm_hour);
if (r > 0)
- c.tm_min = c.tm_sec = 0;
+ c.tm_min = c.tm_sec = tm_usec = 0;
if (r < 0 || tm_out_of_bounds(&c, spec->utc)) {
c.tm_mday ++;
c.tm_hour = c.tm_min = c.tm_sec = tm_usec = 0;
@@ -1038,7 +1038,7 @@ static int find_next(const CalendarSpec *spec, struct tm *tm, usec_t *usec) {
r = find_matching_component(spec->minute, &c.tm_min);
if (r > 0)
- c.tm_sec = 0;
+ c.tm_sec = tm_usec = 0;
if (r < 0 || tm_out_of_bounds(&c, spec->utc)) {
c.tm_hour ++;
c.tm_min = c.tm_sec = tm_usec = 0;