Thanks Gary, just got around to reading your post after an accelerated 
course in how to mess things up on Linux!! I am still not totally sure how 
Linux handles all the Date formatting as on first install the system clock 
t the bottom is in 24hr format, but every thing else displays as 12 hr. I 
finally solved the issue (I think) with the following Linux command

sudo localectl set-locale LC_TIME=en_GB.UTF-8

My locale was set as Canada where the 12hr format is more common, by 
changing the TIME part to GB it then uses 24hr. I am sure there are many 
good reasons I shouldn't do it this way but.........

Mind you, I haven't found a way to return to the 12hr format (not that I 
want to). I would have thought that 

sudo localectl set-locale LC_TIME=en_CA.UTF-8 would work, but it doesn't!


On Thursday, May 5, 2022 at 8:05:24 p.m. UTC-4 gjr80 wrote:

> The problem you have with a skin such as Belchertown that relies on a mix 
> of HTML and Javascript is that you are now no longer simply using WeeWX 
> tags and formatting to generate the displayed data, but you likely have 
> Javascript formatting to deal with as well. Chances are that changing WeeWX 
> formatting, particularly for date-time data, will not give you what you 
> want.
>
> I don't use the Belchertown skins but looking in some of the templates 
> pointed me to these settings in the Belchertown skin.conf [Labels] 
> [[Generic]] (circa line 590):
>
> # moment.js default labels formats
> time_earthquake = "LLL"
> time_last_updated = "LL, LTS"
> time_snapshot_records_today_header = "dddd, LL"
> time_snapshot_records_month_header = "MMMM YYYY"
> time_sunrise = "LT"
> time_sunset = "LT"
> time_forecast_alert_expires = "LLL"
> time_forecast_date = "ddd M/DD"
> time_forecast_time = "ddd LT" # must be {day} {time} format
> time_forecast_last_updated = "LLL"
> time_records_page_full_date = "LLL"
> time_records_page_month_day_year = "LL"
> time_records_page_rainfall_range_begin = "MMMM DD"
> time_records_page_rainfall_range_end = "LL"
>
> To change the 'Last Updated' date-time on main page you need to change the 
> time_last_updated setting. I suspect you will find that "LL LTS" is a 
> locale based format which may or may not give you a 24 hour time format 
> depending on your systems locale. If you google '*formatting date and 
> time with moment.js*' you should find some useful information, it looks 
> like something like 'D MMMM YYYY HH:mm:ss' may be a good starting point. 
> Try changing that setting though you will need to wait for the next report 
> cycle to see the effect of your changes.   
>
> Gary
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/c0c63c99-80c5-474f-a2bd-9fe7d4453553n%40googlegroups.com.

Reply via email to