Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.6.5 (build 3081) - 28 May 2020 (please see important announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

See the Wiki to download the software or click on the Downloads link in the Forum Banner.

PHP Web 'viewer' for Cumulus NOAA Style reports

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

User avatar
beteljuice
Posts: 2918
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: ex XP SP3 - now W10 laptop grr
Location: Dudley, West Midlands, UK

BUG FIX Ver 3.5 ...

Post by beteljuice »

Bug fix ... get zip from first post

V3.5 - Jan 1st 2020
  • bug fix - now is corrected to 'yesterday' (latest possible record)
    CU possible error report if year report is missing - fixed


Don't know why this hasn't been pointed out over the years - or perhaps it's just the way error reporting now is ?

@mark ... code incomplete and not quite correct :o

Code: Select all

$now = date_create('now')->modify('-1 day');
$now_month = $now->format('m'); // mark said mm
$now_year = $now->format('Y');
$prior_month = $now_month - 1; // mark didn't mention
$prior_year = $now_year - 1; // mark didn't mention
Also I discovered an incomplete check further along ..

Code: Select all

//		if ($filesfound[$t] || ($yy == $now_year && $Naming != "CU")) { 
		if ((array_key_exists($t, $filesfound) && $filesfound[$t]) || ($yy == $now_year && $Naming != "CU")) { 
All OK now (I hope)
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
mcrossley
Posts: 6477
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Buster Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: BUG FIX Ver 3.5 ...

Post by mcrossley »

beteljuice wrote:
Wed 01 Jan 2020 3:32 pm
@mark ... code incomplete and not quite correct :o

Code: Select all

$now = date_create('now')->modify('-1 day');
$now_month = $now->format('m'); // mark said mm
$now_year = $now->format('Y');
$prior_month = $now_month - 1; // mark didn't mention
$prior_year = $now_year - 1; // mark didn't mention
Good spot on "m" vs. "mm" - amazingly the "mm" didn't affect the rest of the bullet proof code though!
And the two $prior_xxx values were not used for anything in my copy except for debug messages so they got commented out a while back.

Post Reply