From 897bdf56281bd580b4b2c2e36f77c7c800eb5552 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Sun, 13 Mar 2022 21:40:54 +0100 Subject: [PATCH] Start week on monday --- TimeSeries.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TimeSeries.pm b/TimeSeries.pm index e8e4976..2933fcf 100644 --- a/TimeSeries.pm +++ b/TimeSeries.pm @@ -598,7 +598,7 @@ sub get_ticks { # 30 ... 90 days: 1 tick/week. my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($firsttime); - $firsttime -= 86400 * $wday; + $firsttime -= 86400 * (($wday + 6) % 7); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($firsttime); $sec = $min = $hour = 0;