Hi Barry,
I live in France and use the 24h format. Weewx is installed on a Pi4.
Below, the relevant part of the *skin.conf* file located in the *Belchertown
skin folder*. When I installed the Belchertown skin few years ago, I didn't
do any modification to have the right format.
[Units]
# This section is for managing the selection and formatting of units.
[[Groups]]
#...
[[StringFormats]]
# ...
[[Labels]]
# ...
[[TimeFormats]]
# This section sets the string format to be used for each time
scale.
# The values below will work in every locale, but may not look
# particularly attractive. See the Customization Guide for
alternatives.
day = %X
week = %X (%A)
month = %x %X
year = %x %X
rainyear = %x %X
current = %x %X
ephem_day = %X
ephem_year = %x %X
Pierre-Yves
Le jeudi 5 mai 2022 à 14:32:09 UTC+2, [email protected] a écrit :
> Well, just for the "fun" of it, I did a complete re-install of Linux and
> Weewx (at the moment the computer is only being used to play with Weewx).
> From a clean install I am still not able to change to the 24hr format for
> Weewx. Not that it should matter, but Linux is set to the 24hr format. The
> 4 [[[[ that surround TimeFormats has come up in the clean install, so I
> guess it was nothing I did!! Immediately before [[[[TimeFormats]]]] in
> the weewx.conf is [[[[Groups]]]] and any changes I make there are actioned.
> It's not the end of the world that the time is in the 12 hr format, it's
> now become a battle of (old) man against machine! If anyone has the 24hr
> time format running ok could they post the relevant parts of their config
> file??
>
> Barry
>
> On Wednesday, May 4, 2022 at 4:49:14 p.m. UTC-4 vince wrote:
>
>> naaah - no need to do a full install. You're close enough that this one
>> is just tweaking something (TBD) into the right config file (TBD).
>>
>> On Wednesday, May 4, 2022 at 1:34:06 PM UTC-7 [email protected] wrote:
>>
>>> Thanks for the pointer to more reference material Vince. Being new at
>>> this I have been gathering as much info as possible, unfortunately I miss
>>> some, and others are contradictory. I have no idea where the 4 [[[[ came
>>> from, probably one of my desperate cut and paste attempts!
>>> I think the safest path now is to sort out all my notes and start from
>>> scratch with a new install, at least it gives me practice playing with
>>> Linux.
>>> Barry
>>>
>>> On Wednesday, May 4, 2022 at 3:22:06 p.m. UTC-4 vince wrote:
>>>
>>>> For time formats, the weewx customization guide points you to the
>>>> python date/time formatting options (link)
>>>> <https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior>
>>>> saying
>>>> %A is the day of the week (ie, Monday). The Belchertown docs (link)
>>>> <https://github.com/poblabs/weewx-belchertown#a-note-about-date-and-time-formatting-in-your-locale>
>>>> do
>>>> read a little differently, pointing to the moment.js way to select a time
>>>> format, and his example in skin.conf really confuses me completely.
>>>>
>>>> See if "day = HH:MM" works perhaps....
>>>> (untested)
>>>>
>>>> It's not clear where you're editing things though. The number of [[[[
>>>> ]]]] pairs looks possibly wrong, which can break things.
>>>>
>>>> On Wednesday, May 4, 2022 at 11:47:20 AM UTC-7 [email protected] wrote:
>>>>
>>>>> Hi all, I'm new to all this configurtion stuff after using a Vantage
>>>>> Pro 2 and Ambient s/w for the last 15+ years! I now have a Weatherflow
>>>>> Tempest using Weewx with the Belchertown skin on a RPi4. So far I have
>>>>> pretty much persuded it to do what I want with the exception of
>>>>> displaying
>>>>> tome in the 24 hour format. Regardless of all the changes I have made it
>>>>> insists on displaying any time in the AM / PM format i.e. 2:20:00PM
>>>>> instead
>>>>> of 14:20.
>>>>>
>>>>> From what I have read I need to make changes in:
>>>>> [Belchertown]
>>>>> [[[[TimeFormats]]]]
>>>>> day = %HH:MM
>>>>> week = %HH:MM on %A (what is the %A)::
>>>>> etc.
>>>>> etc.
>>>>>
>>>>> I have tried various combinations of %H:%M %HH:%MM %h:%m, all with
>>>>> no effect. Can some one point me in the right direction to fix this.
>>>>> Weefx
>>>>> has been restarted after each attempt to fix this!wxt
>>>>>
>>>>> Also, while on the subject of time, the time is posted to the data on
>>>>> my web page, but I can see no sign of it if I open up
>>>>> /var/www/html/weewx/index.html with my browser, is this normal?
>>>>>
>>>>> Thanks for any help that can be given
>>>>>
>>>>
--
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/900f276c-9c6c-4fc9-ab9a-89b75a0d226en%40googlegroups.com.