[rrd-developers] Too easy ?
Alex van den Bogaerdt
alex at ergens.op.HET.NET
Wed May 1 00:40:58 MEST 2002
Hi,
I've modified parsetime.c in order to allow for the
'YYYYMMDD HH:MM' syntax again. It just seems too simple so I'm
afraid I'm overlooking something. Here's the patch, please check:
--- ./parsetime.c.orig Thu Jan 31 12:56:24 2002
+++ ./parsetime.c Wed May 1 00:33:40 2002
@@ -42,7 +42,8 @@
*
* TIME-SPECIFICATION ::= TIME-REFERENCE [ OFFSET-SPEC ] |
* OFFSET-SPEC |
- * ( START | END ) OFFSET-SPEC
+ * ( START | END ) OFFSET-SPEC |
+ * AUTOSORT-SPEC
*
* TIME-REFERENCE ::= NOW | TIME-OF-DAY-SPEC [ DAY-SPEC-1 ] |
* [ TIME-OF-DAY-SPEC ] DAY-SPEC-2
@@ -53,12 +54,13 @@
* DAY-SPEC-1 ::= NUMBER '/' NUMBER '/' NUMBER | # MM/DD/[YY]YY
* NUMBER '.' NUMBER '.' NUMBER | # DD.MM.[YY]YY
* NUMBER # Seconds since 1970
- * NUMBER # YYYYMMDD
*
* DAY-SPEC-2 ::= MONTH-NAME NUMBER [NUMBER] | # Month DD [YY]YY
* 'yesterday' | 'today' | 'tomorrow' |
* DAY-OF-WEEK
*
+ * AUTOSORT-SPEC ::= NUMBER [ TIME-OF-DAY-SPEC ] # YYYYMMDD HH:MM
+ *
*
* OFFSET-SPEC ::= '+'|'-' NUMBER TIME-UNIT { ['+'|'-'] NUMBER TIME-UNIT }
*
@@ -727,6 +729,8 @@
mon = atol(cmon);
strncpy(cmday,&(sc_token[6]),2);cmday[2]='\0';
mday = atol(cmday);
+ token();
+ try(tod(ptv))
token();
} else {
token();
--
__________________________________________________________________
/ alex at slot.hollandcasino.nl alex at ergens.op.het.net \
| work private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. |
+----------------------------------------------------------------------+
| http://faq.mrtg.org/ |
| http://rrdtool.eu.org --> tutorial |
+----------------------------------------------------------------------+
--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-developers
mailing list