We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa75ecb commit a78c92cCopy full SHA for a78c92c
src/parser.c
@@ -2435,6 +2435,9 @@ lyp_check_date(struct ly_ctx *ctx, const char *date)
2435
if (!r || r != &date[LY_REV_SIZE - 1]) {
2436
goto error;
2437
}
2438
+ /* set some arbitrary non-0 value in case DST changes, it could move the day otherwise */
2439
+ tm.tm_hour = 12;
2440
+
2441
memcpy(&tm_, &tm, sizeof tm);
2442
mktime(&tm_); /* mktime modifies tm_ if it refers invalid date */
2443
if (tm.tm_mday != tm_.tm_mday) { /* e.g 2018-02-29 -> 2018-03-01 */
0 commit comments