Barry,

Unfortunately the Google groups spam checker leaves a bit to be desired. If 
seems to mark some folks replies as spam for no apparent (to us) reason. 
When a post is marked as spam the group managers/owners don't get notified 
there are posts awaiting checking/release unless we happen to view the 
group in a browser and notice the pending posts. And to cap it all off when 
we do release a post that was marked as spam it is often shown as deleted 
(well that is what happens to me 90% of the time, Tom seems to have more 
success). Enough Google complaining.

Changing the locale may have given you the 24 hour time format you seek but 
I think you will find that changing locales to somewhere where you are not 
may solve one problem but create a number of others (not necessarily WeeWX 
related). The Belchertown skin appears to use a number of locale based 
formats  (as does WeeWX) to give usable date-time formats for most users 
around the world. When you want something different a half way decent skin 
will give you the ability to alter the formats in weewx.conf or skin.conf 
which is exactly what the Belchertown skin does. It might take a bit of 
playing around but I would try and persist with your correct locale and 
tweak the date and time formats in the Belchertown skin.conf to get what 
you want. 

Gary 

On Saturday, 7 May 2022 at 17:06:15 UTC+10 gjr80 wrote:

> Barry's reply was caught up again by the Google-groups spaminator. Even 
> when I release the posts they show up as deleted so I have posted the first 
> below (sans some formatting):
>
> Gary
>
> 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/8e44559d-6266-4c92-8c96-bed6b9e3a026n%40googlegroups.com.

Reply via email to