X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/ee2fccf67428124c6ae125e5c35064c6ccae7a7b..decb6723ffef77eb4e5ac3ceea675cd7fe0450b0:/web/image_minmax.php 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;