]> granicus.if.org Git - sysstat/commitdiff
SVG: Print time zone instead of UTC in true time mode (#331)
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 4 Sep 2022 08:50:06 +0000 (10:50 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 4 Sep 2022 08:50:06 +0000 (10:50 +0200)
sadf -g -t should not display "UTC" but the real time zone of the user
who created the datafile.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
svg_stats.c

index 7265c77bca7331ca5d6c39c964dc2cf8f131e08a..e9c4484e117726dea1b051d29de818a71153a46a 100644 (file)
@@ -740,8 +740,9 @@ void display_vgrid(long int xpos, double xfactor, int v_gridnr, struct svg_parm
 
        if (!PRINT_LOCAL_TIME(flags)) {
                printf("<text x=\"-10\" y=\"30\" style=\"fill: #%06x; stroke: none; font-size: 12px; "
-                      "text-anchor: end\">UTC</text>\n",
-                      svg_colors[palette][SVG_COL_INFO_IDX]);
+                      "text-anchor: end\">%s</text>\n",
+                      svg_colors[palette][SVG_COL_INFO_IDX],
+                      PRINT_TRUE_TIME(flags) ? svg_p->file_hdr->sa_tzname : "UTC");
        }
 }