From 49c27c7a089cd3a9e699e59444bdc384b3de9cb0 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Wed, 17 Nov 2021 12:12:26 +0100 Subject: [PATCH] Fix year computation --- TimeSeries.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TimeSeries.pm b/TimeSeries.pm index 9d592ac..eb0350d 100644 --- a/TimeSeries.pm +++ b/TimeSeries.pm @@ -552,7 +552,7 @@ sub get_ticks { $sec = $min = $hour = 0; $mday = 1; $mon = 0; - $year = floor($year / 5) * 5; + $year = floor(($year + 1900) / 5) * 5; $firsttime = timelocal($sec,$min,$hour,$mday,$mon,$year); $label = '%Y-%m-%d';