summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 862f123)
raw | patch | inline | side by side (parent: 862f123)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 12 Apr 2008 09:21:31 +0000 (09:21 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 12 Apr 2008 09:21:31 +0000 (09:21 +0000) |
-- tobi
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@1323 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@1323 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/parsetime.c | patch | blob | history |
diff --git a/src/parsetime.c b/src/parsetime.c
index 919dd50b340d74ed8806c59af2e9ae88b0082aaf..74063b200a876aa4a44e797d55ca0ac09a5c8261 100644 (file)
--- a/src/parsetime.c
+++ b/src/parsetime.c
break;
}
- if (mon > 19700101 && mon < 24000101){ /*works between 1900 and 2400 */
+ if (mon > 19700101 && mon < 24000101){ /*works between 1970 and 2400 */
char cmon[3],cmday[3],cyear[5];
strncpy(cyear,sc_token,4);cyear[4]='\0';
year = atol(cyear);
ptv->type = ABSOLUTE_TIME;
ptv->offset = 0;
ptv->tm = *localtime(&now);
- ptv->tm.tm_isdst = -1; /* mk time can figure this out for us ... */
+ ptv->tm.tm_isdst = -1; /* by default lets mk time guess dst status ... */
+
token();
switch (sc_tokid) {
panic(e("unparsable trailing text: '...%s%s'", sc_token, sct));
}
- ptv->tm.tm_isdst = -1; /* for mktime to guess DST status */
if( ptv->type == ABSOLUTE_TIME )
if( mktime( &ptv->tm ) == -1 ) { /* normalize & check */
/* can happen for "nonexistent" times, e.g. around 3am */