diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2018-12-28 16:58:59 +0000 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2018-12-28 16:58:59 +0000 |
commit | 54f151b2d9abb8dfafe4b69ccc783bdec46b65f5 (patch) | |
tree | 69bb52ffbd12913ec4356bab1507f76c5e7f4f05 /src/parsdate.c | |
parent | eee24ddac89576eaf9efdd3753eb35e1e7bf4a6d (diff) | |
download | lynx-snapshots-54f151b2d9abb8dfafe4b69ccc783bdec46b65f5.tar.gz |
snapshot of project "lynx", label v2-9-0dev_0e
Diffstat (limited to 'src/parsdate.c')
-rw-r--r-- | src/parsdate.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/parsdate.c b/src/parsdate.c index d4a71afd..d0e772f1 100644 --- a/src/parsdate.c +++ b/src/parsdate.c @@ -22,7 +22,7 @@ #include <LYLeaks.h> /* - * $LynxId: parsdate.c,v 1.26 2018/12/27 22:31:48 tom Exp $ + * $LynxId: parsdate.c,v 1.27 2018/12/28 01:54:18 tom Exp $ * * This module is adapted and extended from tin, to use for LYmktime(). * @@ -672,10 +672,12 @@ static time_t Convert(time_t Month, time_t Day, time_t Year, time_t Hours, } else if (dst == DSTmaybe) { struct tm *tm = localtime(&tod); - if (tm != NULL && tm->tm_isdst) - Julian -= DST_OFFSET * 60 * 60; - else + if (tm != NULL) { + if (tm->tm_isdst) + Julian -= DST_OFFSET * 60 * 60; + } else { Julian = BAD_TIME; + } } return Julian; } @@ -1039,7 +1041,7 @@ time_t parsedate(char *p, * from the error return value. (Alternately could set errno on error.) */ return (Start == BAD_TIME) ? 0 : Start; } -#line 1043 "y.tab.c" +#line 1045 "y.tab.c" #if YYDEBUG #include <stdio.h> /* needed for printf */ @@ -1524,7 +1526,7 @@ case 35: yyval.Meridian = yystack.l_mark[0].Meridian; } break; -#line 1528 "y.tab.c" +#line 1530 "y.tab.c" } yystack.s_mark -= yym; yystate = *yystack.s_mark; |