"*:*:*" is now formatted as "*:*:*" instead of "*:*:00/1"
}
int calendar_spec_to_string(const CalendarSpec *c, char **p) {
+ CalendarComponent *cc;
char *buf = NULL;
size_t sz = 0;
FILE *f;
fputc(':', f);
format_chain(f, 2, c->minute, false);
fputc(':', f);
- format_chain(f, 2, c->microsecond, true);
+
+ cc = c->microsecond;
+ if (cc && !cc->value && cc->repeat == USEC_PER_SEC && !cc->next)
+ fputc('*', f);
+ else
+ format_chain(f, 2, c->microsecond, true);
if (c->utc)
fputs(" UTC", f);
test_one("Monday", "Mon *-*-* 00:00:00");
test_one("Monday *-*-*", "Mon *-*-* 00:00:00");
test_one("*-*-*", "*-*-* 00:00:00");
+ test_one("*:*:*", "*-*-* *:*:*");
test_next("2016-03-27 03:17:00", "", 12345, 1459048620000000);
test_next("2016-03-27 03:17:00", "CET", 12345, 1459041420000000);