summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a218448)
raw | patch | inline | side by side (parent: a218448)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 22 Oct 2006 21:20:45 +0000 (21:20 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 22 Oct 2006 21:20:45 +0000 (21:20 +0000) |
time date
date time
time date + xxx
date time + xxx
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@908 a5681a0c-68f1-0310-ab6d-d61299d08faa
date time
time date + xxx
date time + xxx
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@908 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/parsetime.c | patch | blob | history |
diff --git a/src/parsetime.c b/src/parsetime.c
index f1958430224ef73487e8660001334315ca84d38a..47ddbbfc7a3fe95bfccb54eb1e823e328b2958b6 100644 (file)
--- a/src/parsetime.c
+++ b/src/parsetime.c
/* Only absolute time specifications below */
case NUMBER:
- try(tod(ptv))
- try(day(ptv))
- try(tod(ptv))
+ {
+ long hour_sv = ptv->tm.tm_hour;
+ long year_sv = ptv->tm.tm_year;
+ ptv->tm.tm_hour = 30;
+ ptv->tm.tm_year = 30000;
+ try(tod(ptv))
+ try(day(ptv))
+ if ( ptv->tm.tm_hour == 30 && ptv->tm.tm_year != 30000 ){
+ try(tod(ptv))
+ }
+ if ( ptv->tm.tm_hour == 30 ){
+ ptv->tm.tm_hour = hour_sv;
+ }
+ if ( ptv->tm.tm_hour == 30000 ){
+ ptv->tm.tm_year = year_sv;
+ }
+ };
break;
/* fix month parsing */
case JAN: case FEB: case MAR: case APR: case MAY: case JUN: