From: oetiker Date: Sat, 12 Apr 2008 09:21:31 +0000 (+0000) Subject: do not mess with dst status after running localtime, the system gets confused otherwh... X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=commitdiff_plain;h=b52501e79a33df06a0f67203c2e1b57cafdc6fdf do not mess with dst status after running localtime, the system gets confused otherwhise when it comes to times during the switch over periode as DST changes to non DST. -- tobi git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1323 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/parsetime.c b/src/parsetime.c index 4c0f089..8818f1c 100644 --- a/src/parsetime.c +++ b/src/parsetime.c @@ -848,7 +848,7 @@ char *parsetime( 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; /* mk time can figure dst by default ... */ token(); switch (sc_tokid) { @@ -978,8 +978,6 @@ char *parsetime( 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 */