Web Weather > Custom Website Templates

Problem with date display on main page

(1/2) > >>

garlandclan:
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

saratogaWX:
Try changing ajaxWEEWXwx.js from
--- Code: ---var swapDayMonth = false;     // =false; leave as-is, =true; swap day/month in clientraw[74]

--- End code ---
to
--- Code: ---var swapDayMonth = true;     // =false; leave as-is, =true; swap day/month in clientraw[74]

--- End code ---

garlandclan:
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!

wvdkuil:

--- Quote from: garlandclan 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!

--- End quote ---

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

garlandclan:
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.

Navigation

[0] Message Index

[#] Next page

Go to full version