$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;