]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Merge branch 'master' into add-jsontime
authorMark Brugnoli-Vinten <netniv@hotmail.com>
Mon, 27 Jul 2020 16:54:29 +0000 (17:54 +0100)
committerGitHub <noreply@github.com>
Mon, 27 Jul 2020 16:54:29 +0000 (17:54 +0100)
1  2 
doc/rrdgraph.pod
src/rrd_graph.c
src/rrd_graph.h
src/rrd_tool.c

index 184f2fdbf092bdcd1b17bb8320dd6acc69661b4c,ad13726f5617a5b04eb9964f1fada38fd941586e..305753086917123ce077ceac9f50ed2d2fe9b3c1
@@@ -562,11 -562,11 +562,16 @@@ If one DS is missing, either because th
  because it does not contain the requested DS name, just assume that we
  got empty values instead of raising a fatal error.
  
 +[B<--add-jsontime>]
 +
 +Adds B<xport> data in B<JSONTIME> format, giving both graph image data
 +and data point values in one call to graphv command.
 +
+ [B<--utc>]
+ Force the timezone to be UTC. Equivalent to doing TZ=UTC rrdtool graph .... 
+ This is useful to calculate daily average ranging from midnight to midnight rather than say the last 24 hours.
  =head2 Data and variables
  
  B<DEF:>I<vname>B<=>I<rrdfile>B<:>I<ds-name>B<:>I<CF>[B<:step=>I<step>][B<:start=>I<time>][B<:end=>I<time>]
diff --cc src/rrd_graph.c
Simple merge
diff --cc src/rrd_graph.h
index 958d087481110d67eec18c433f237664a0853287,b2e622b2d88b34b27049cf242a1a276d63863dd4..914695f337f48a1630b96a452c769dc38278c4ce
@@@ -45,7 -45,7 +45,8 @@@
  #define FULL_SIZE_MODE     0x200    /* -width and -height indicate the total size of the image */
  #define NO_RRDTOOL_TAG 0x400  /* disable the rrdtool tag */
  #define ALLOW_MISSING_DS 0x800  /* missing DS is not fatal */
- #define FORCE_JSONTIME 0x1000  /* add jsontime to graphv output */
++#define FORCE_JSONTIME 0x2000  /* add jsontime to graphv output */
+ #define FORCE_UTC_TIME 0x1000   /* Work in UTC timezone instead of localtimg */
  
  #define gdes_fetch_key(x)  sprintf_alloc("%s:%s:%d:%d:%d:%d:%d:%d",x.rrd,x.daemon,x.cf,x.cf_reduce,x.start_orig,x.end_orig,x.step_orig,x.step)
  
diff --cc src/rrd_tool.c
index 9a66eacaab01934bcc9f645aa46809113fe8eebd,6bd433b237e017ea601a4a0bd70b70fc9c3d63b0..679e1745f36d8d01e83e9688ed994d29647da556
@@@ -180,7 -180,7 +180,8 @@@ static void PrintUsage
             "\t\t[-t|--title string]\n"
             "\t\t[-W|--watermark string]\n"
             "\t\t[-Z|--use-nan-for-all-missing-data]\n"
-            "\t\t[---add-jsontime]\n"
++           "\t\t[--add-jsontime]\n"
+            "\t\t[--utc]\n"
             "\t\t[DEF:vname=rrd:ds-name:CF]\n");
      const char *help_graph3 =
          N_("\t\t[CDEF:vname=rpn-expression]\n"