calendarspec: always interpret missing seconds as :00 (#4813)
"*:*" should be equivalent to "*-*-* *:*:00" (minutely) rather than running every microsecond. Fixes #4804
This commit is contained in:
committed by
Lennart Poettering
parent
9c77d1079d
commit
c0df71fa36
@@ -752,12 +752,8 @@ static int parse_calendar_time(const char **p, CalendarSpec *c) {
|
||||
goto fail;
|
||||
|
||||
/* Already at the end? Then it's hours and minutes, and seconds are 0 */
|
||||
if (*t == 0) {
|
||||
if (m != NULL)
|
||||
goto null_second;
|
||||
|
||||
goto finish;
|
||||
}
|
||||
if (*t == 0)
|
||||
goto null_second;
|
||||
|
||||
if (*t != ':') {
|
||||
r = -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user