Author Topic: Problem with date display on main page  (Read 1050 times)

0 Members and 1 Guest are viewing this topic.

Offline garlandclan

  • Member
  • *
  • Posts: 15
  • In the ACTUAL Northern California
    • Garland Clan Weather
Problem with date display on main page
« on: April 16, 2023, 03:37:32 PM »
Hello everyone!

After breaking my linux install, and rebuilding from scratch, I decided to build a *new* Weewx/Saratoga scripts page without pulling much of the original modified data since my site was *way* behind in updates.  So now that I have it reinstalled, data restored, and new (current) scripts, I'm having a tiny issue with the date display on the main page.  I can't for the life of me see where the issue is.  I have all my files and Weewx data set to m/d/y in every conceivable location, yet the main page shows d/m/y. 

I'd love to know where I can change that setting. 

Currently running the latest Weewx, with the Saratoga extensions, and have setup everything to use the WEEWX plugin data points.  I can't remember if my site is in my profile, but I can be found at https://weather.lavacrawlers.com and my Weewx (and tags/clientraw) are at https://weather.lavacrawlers.com/weewx.

Thanks!  Loving the updated scripts since I now (again) have the satellite data which I really enjoyed until it was lost in space.
Sean

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Problem with date display on main page
« Reply #1 on: April 16, 2023, 03:50:05 PM »
Try changing ajaxWEEWXwx.js from
Code: [Select]
var swapDayMonth = false;     // =false; leave as-is, =true; swap day/month in clientraw[74]
to
Code: [Select]
var swapDayMonth = true;     // =false; leave as-is, =true; swap day/month in clientraw[74]
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 garlandclan

  • Member
  • *
  • Posts: 15
  • In the ACTUAL Northern California
    • Garland Clan Weather
Re: Problem with date display on main page
« Reply #2 on: April 29, 2023, 11:19:31 AM »
Hey Ken,

Sorry for the delay...  You guys are great and fast response, and I dropped this project for a bit (work)...

Anyway that setting doesn't seem to have any effect on that main page.  There are two spots that do weird things.  That top banner, and right below the maps...  Below the map will show Apr-29-2023 *sometimes* but after a second reverts back to 29/4/2023... 

I *think* I have all the other files setup correctly with mdy. 

Thanks!

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Problem with date display on main page
« Reply #3 on: April 29, 2023, 11:40:41 AM »
Hey Ken,

Sorry for the delay...  You guys are great and fast response, and I dropped this project for a bit (work)...

Anyway that setting doesn't seem to have any effect on that main page. There are two spots that do weird things.  That top banner, and right below the maps...  Below the map will show Apr-29-2023 *sometimes* but after a second reverts back to 29/4/2023... 

I *think* I have all the other files setup correctly with mdy. 

Thanks!

The two files use different date formats
weewx/WEEWXtags.php
$date = '04/29/2023';

weewx/clientraw.txt
. . . 5926.6 29/4/2023 17.7 10.7 1. . .

The first display of the date comes from the WEEWXtags.php file  04/29/2023
After that the javescripts use the clientraw to update a lot of fields, one of them the date/time field itself.  29/4/2023

As Ken already posted, please check line 72   in https://weather.lavacrawlers.com/ajaxWEEWXwx.js it still reads
var swapDayMonth = false;     // =false; leave as-is, =true; swap day/month in clientraw[74]
it should read
var swapDayMonth = true;     // =false; leave as-is, =true; swap day/month in clientraw[74]

Succes,
Wim
« Last Edit: April 29, 2023, 11:43:37 AM by wvdkuil »

Offline garlandclan

  • Member
  • *
  • Posts: 15
  • In the ACTUAL Northern California
    • Garland Clan Weather
Re: Problem with date display on main page
« Reply #4 on: April 29, 2023, 12:48:34 PM »
Hey Wim,

I have a working copy of the website on my actual Weewx box.  This way I can make changes, and test before copying the files over to the actual website.  I changed it locally and it produced no different result.  For visibility I have synced the local copy to the web, so you can see that there is no change.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Problem with date display on main page
« Reply #5 on: April 29, 2023, 01:00:09 PM »
Hey Wim,

I have a working copy of the website on my actual Weewx box.  This way I can make changes, and test before copying the files over to the actual website.  I changed it locally and it produced no different result.  For visibility I have synced the local copy to the web, so you can see that there is no change.

It works OK, but you have to refresh the javascripts in your browser.
different for every browser on every platform.
My Mac => right click, select inspect, circled arrow next to the locked in the adress area
Select "forced reload or whatever it says in English.

« Last Edit: April 29, 2023, 01:02:01 PM by wvdkuil »

Offline Vasco

  • Forecaster
  • *****
  • Posts: 342
    • PWS
Re: Problem with date display on main page
« Reply #6 on: April 29, 2023, 01:25:50 PM »
It works OK, but you have to refresh the javascripts in your browser.

On most PCs use Ctrl-F5

And check your Status page: I think WU radar disappeared a long time ago  :-)

« Last Edit: April 29, 2023, 01:27:25 PM by Vasco »
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline garlandclan

  • Member
  • *
  • Posts: 15
  • In the ACTUAL Northern California
    • Garland Clan Weather
Re: Problem with date display on main page
« Reply #7 on: April 29, 2023, 01:43:42 PM »
Hey everyone - thank you!!!  I should have known/done the refresh thing.  I haven't had to do that on a webpage in a while.  As an IT guy by day, I'm in websites all day every day (have like 100 tabs open) and really haven't thought about that in a while.  Works like a dream though.

Good hint on the status page.  I'll clean that up as well.  This box was running very old scripts for a long time, and then I killed it (literally broke it bad) so this is it's *new* reincarnated version with fresh everything for the most part. 

Thanks again everyone!
Sean