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