diff -Nru systemd-229/debian/changelog systemd-229/debian/changelog --- systemd-229/debian/changelog 2016-02-28 22:58:20.000000000 +0100 +++ systemd-229/debian/changelog 2016-03-18 12:21:19.000000000 +0100 @@ -1,3 +1,11 @@ +systemd (229-2ubuntu2) xenial; urgency=medium + + * cherry pick upstream a022d76e6 that fixes upstream bug: + https://github.com/systemd/systemd/issues/2682 + "timer unit 'OnCalendar=' calculates wrong execution date" + + -- Michael Vogt Fri, 18 Mar 2016 12:20:36 +0100 + systemd (229-2ubuntu1) xenial; urgency=medium * Merge with Debian unstable. Remaining Ubuntu changes: diff -Nru systemd-229/debian/patches/series systemd-229/debian/patches/series --- systemd-229/debian/patches/series 2016-02-28 22:58:20.000000000 +0100 +++ systemd-229/debian/patches/series 2016-03-18 12:19:56.000000000 +0100 @@ -1,6 +1,7 @@ ## Cherry-picked from upstream time-util-map-ALARM-clockids-to-non-ALARM-clockids-in-now.patch networkd-tunnel-fix-tunnel-address.patch +upstream-git-a022d76e6.patch ## Debian specific patches Add-back-support-for-Debian-specific-config-files.patch diff -Nru systemd-229/debian/patches/upstream-git-a022d76e6.patch systemd-229/debian/patches/upstream-git-a022d76e6.patch --- systemd-229/debian/patches/upstream-git-a022d76e6.patch 1970-01-01 01:00:00.000000000 +0100 +++ systemd-229/debian/patches/upstream-git-a022d76e6.patch 2016-03-18 12:19:42.000000000 +0100 @@ -0,0 +1,42 @@ +commit a022d76e6a7c711954be5535e6308d0a470e232a +Author: Hristo Venev +Date: Mon Feb 22 08:02:48 2016 -0500 + + calendarspec: fix find_next skipping times + + reset usec when bumping hours/minutes + +diff --git a/src/basic/calendarspec.c b/src/basic/calendarspec.c +index 00fc39a..2f40ba2 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; +diff --git a/src/test/test-calendarspec.c b/src/test/test-calendarspec.c +index 8754cb3..5a8c6cb 100644 +--- a/src/test/test-calendarspec.c ++++ b/src/test/test-calendarspec.c +@@ -137,6 +137,7 @@ int main(int argc, char* argv[]) { + test_next("2015-11-13 09:11:23.42", "EET", 12345, 1447398683420000); + test_next("2015-11-13 09:11:23.42/1.77", "EET", 1447398683420000, 1447398685190000); + test_next("2015-11-13 09:11:23.42/1.77", "EET", 1447398683419999, 1447398683420000); ++ test_next("Sun 16:00:00", "CET", 1456041600123456, 1456066800000000); + + assert_se(calendar_spec_from_string("test", &c) < 0); + assert_se(calendar_spec_from_string("", &c) < 0);