X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/ee2fccf67428124c6ae125e5c35064c6ccae7a7b..3fd934fc66956e08777aaa10bd2ee27c1bc62758:/web/image_minmax.php?ds=inline diff --git a/web/image_minmax.php b/web/image_minmax.php index dfa66d2..183942b 100644 --- a/web/image_minmax.php +++ b/web/image_minmax.php @@ -84,16 +84,17 @@ if ($type and $param) { $next_year = $year; $next_month = $month+1; - if ($month==13) { + if ($month==12) { $next_year++; $next_month=1; - + } $curr = date("Ym"); + $ym=sprintf('%04d%02d',$next_year,$next_month); - if ($curr>$next_year.$next_month) { + if ($curr>$ym) { $cachefilename='meteo.month.'.$sensor.'.'.$param.'.'.$to_unit.'.'.$year.'-'.$month.'.'.$img_format;