Author Topic: Saratoga and Date  (Read 1039 times)

0 Members and 1 Guest are viewing this topic.

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1314
  • BismarckWeather.net
    • BismarckWeather.net
Saratoga and Date
« on: January 26, 2018, 04:01:33 PM »
I noticed this before the first of the year, so I don't think it's related to the new year.  But both my ticker at the top and my main ajax conditions are showing their date format as Day/Month/Year.  Not sure if that's been always happening and I just haven't noticed it or what.

Running Cumulux MX.  I'm betting it's a setting somewhere in there, just can't find where.

http://www.bismarckweather.net/
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga and Date
« Reply #1 on: January 26, 2018, 04:11:01 PM »
Your CUtags.php?sce=dump shows
Code: [Select]
$WX['date'] = '1/26/2018';
in mm/dd/yyyy format.
Your realtime.txt shows
Code: [Select]
26/01/18 which is dd/mm/yyyy format.

In Settings.php you have
Code: [Select]
$SITE['WDdateMDY'] = true; // for WD date format of month/day/year.  =false for day/month/year
so the PHP code is parsing the CUtags.php date ok.

In ajaxCUwx.js you have
Code: [Select]
var showDateMDY = false;     // set to false to show date as dd/mm/yy
so change that to
Code: [Select]
var showDateMDY = true;     // set to false to show date as dd/mm/yy
so the AJAX update will appear in mm/dd/yyyy format.
Note that only mm/dd/yyyy or dd/mm/yyyy formats are available with the AJAX script.  Your Settings.php entries should match the selected format in order to not change date formats when the AJAX updates kick in for the page.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1314
  • BismarckWeather.net
    • BismarckWeather.net
Re: Saratoga and Date
« Reply #2 on: January 26, 2018, 04:16:34 PM »
Thanks.  Now that you mention it, I think I did update that file probably sometime in December.

I've also decided to take out the visible satellite until WU fixes that graphic.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1314
  • BismarckWeather.net
    • BismarckWeather.net
Re: Saratoga and Date
« Reply #3 on: January 27, 2018, 01:33:49 PM »
I did notice something else odd.  The JS change fixed my Windows10 FF/IE11/Chrome/Edge time to all be the right format.  But Chrome on my Android is still showing DD/MM/YY.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga and Date
« Reply #4 on: January 27, 2018, 01:45:35 PM »
Clear the Android Chrome browser cache.. it may have cached the .js file from before your change.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1314
  • BismarckWeather.net
    • BismarckWeather.net
Re: Saratoga and Date
« Reply #5 on: January 27, 2018, 02:19:02 PM »
Once again, you are correct sir!  Thanks again.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI