WXforum.net
Web Weather => Weather Website PHP/AJAX scripting => Custom Website Templates => Topic started by: PaulMy on December 08, 2017, 09:54:11 AM
-
Hi Ken,
The www.komokaweather.ca (http://www.komokaweather.ca) dashboard data seems to be up to date and working well, however the station status http://www.komokaweather.ca/wxstatus.php (http://www.komokaweather.com/komokaweather-ca/wxstatus.php) shows the Cumulus weather data to be way out of date. Looking at the time it is a different format, mm/dd/yyyy compared to the realtime.txt which is dd/mm/yyyyy. I am pretty sure it had been working properly before the cPanel upgrade. Could that also be a cPanel difference in some date settings?
I have looked in wxstatus.php and include-wxstatus.php to see if I could determine where the difference comes from, but unfortunately beyond me.
Thanks,
Paul
-
Easy.. it's a mismatch between the date cumulus is using in the tags, and how the template says the date is structured.
http://www.komokaweather.com/weather/CUtags.php?sce=dump shows $WX['date'] = '12/08/17';
which is in mm/dd/yyyy format.
The check-fetch-times.php?show=settings shows $SITE['WDdateMDY'] = false; // for weather software date format of month/day/year. =false for day/month/year
so it is expecting dd/mm/yyyy format from Cumulus.
Change that to $SITE['WDdateMDY'] = true; // for weather software date format of month/day/year. =false for day/month/year
to expect mm/dd/yyyy format from Cumulus.
Your weather/realtime.txt is showing the date in dd/mm/yyyy format (ok) and ajaxCUwx.js has var showDateMDY = false; // set to false to show date as dd/mm/yy
which is also OK.
I'd recommend changing Settings.php to clear up the issue.
-
Yes easy... and so simple if/once you know it :oops:
It seems a couple of my issues after the cPanel upgrade had to do with possible mix-up of files on my computer, and what I downloaded from the old server and then uploaded to cPanel.
i.e. the old server download had lower case settings.php, yet my computer files which I would have used to initially upload to that server had uppercase Settings.php
I will try to remember to recheck or compare original files next time.
So now on to the MySQL DB changeover to cPanel.
It has been a good exercise overall as it makes me look at all the older scripts and see which ones are no longer working properly. I appreciate your help and guidance Ken, and GoDaddy was overall very helpful to my many support questions. And the cPanel hosting upgrade cost for 2 years is the same cost as a one year renewal of my old hosting so a good bonus, for my temporary frustrations!
Paul