X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_parsetime.c;h=1b59f454252a851a72f6cf0d2e3a4fe433393f73;hb=45b09b473ffe27306f8f17a02963ba3d305dfdbb;hp=7fa355938fe6ed399bc955f7626f86d345087623;hpb=8380c6e953a15347b40f2c5c4cc57c2daa8b8c63;p=rrdtool.git diff --git a/src/rrd_parsetime.c b/src/rrd_parsetime.c index 7fa3559..1b59f45 100644 --- a/src/rrd_parsetime.c +++ b/src/rrd_parsetime.c @@ -114,14 +114,17 @@ /* Local headers */ -#include "rrd_tool.h" #include +#include +#include + +#include "rrd_tool.h" /* Structures and unions */ enum { /* symbols */ MIDNIGHT, NOON, TEATIME, - PM, AM, YESTERDAY, TODAY, TOMORROW, NOW, START, END, + PM, AM, YESTERDAY, TODAY, TOMORROW, NOW, START, END, EPOCH, SECONDS, MINUTES, HOURS, DAYS, WEEKS, MONTHS, YEARS, MONTHS_MINUTES, NUMBER, PLUS, MINUS, DOT, COLON, SLASH, ID, JUNK, @@ -154,6 +157,7 @@ static const struct SpecialToken VariousWords[] = { {"s", START}, {"end", END}, {"e", END}, + {"epoch", EPOCH}, {"jan", JAN}, {"feb", FEB}, @@ -856,6 +860,9 @@ char *rrd_parsetime( case MINUS: break; /* jump to OFFSET-SPEC part */ + case EPOCH: + ptv->type = RELATIVE_TO_EPOCH; + goto KeepItRelative; case START: ptv->type = RELATIVE_TO_START_TIME; goto KeepItRelative;