X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/42bd3e809b0fa95d3a463462e242caf40d98bf79..6f6f38ad845e089ef732873cfcf8e321d8cc1e38:/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;