Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Date format in realtime.txt

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Date format in realtime.txt

Post by HansR »

Can the format of the #Date field in realtime.txt (the first field) be changed by the user through simple configuration or by locale setting?
I mean the realtime.txt as is, not a user created one.

(Note: This is not a wish ;) )
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Date format in realtime.txt

Post by mcrossley »

The order is always the same DD MM YY, but the separator is defined by the locale setting - that's from the wiki. I'll check that is still true in the code tomorrow...
User avatar
PaulMy
Posts: 4355
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Date format in realtime.txt

Post by PaulMy »

@Mark
The order is always the same DD MM YY, but the separator is defined by the locale setting - that's from the wiki. I'll check that is still true in the code tomorrow...
You may already know that in the Cumulus1 install the Help file says:

Code: Select all

If the 'realtime' option is selected, Cumulus creates a file called realtime.txt at the specified interval, and if configured to do so, uploads it to your web site. The format of this file is as follows:

Example: 18/10/08 16:03:45 8.4 84 5.8 24.2 33.0 261 0.0 1.0 999.7 W 6 mph C mb mm 146.6 +0.1 85.2 588.4 11.6 20.3 57 3.6 -0.7 10.9 12:00 7.8 14:41 37.4 14:38 44.0 14:28 999.8 16:01 998.4 12:06 1.8.2 448 36.0 10.3 10.5 13 0.2 14 260 2.3 13 1 0 NNW 2040 ft 12.3 11.1 420.1 1

Field Example Description 
1 18/10/08 date (always dd/mm/yy) 
2 16:03:45 time(always hh:mm:ss) 
I'll make note on MX ;)

Enjoy,
Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Date format in realtime.txt

Post by HansR »

OK, so for the date it is always a slash (unless Mark comes with the locale separator option).

A similar issue for the realtime is the unit of pressure: I would expect the 'inHg' to be explicit but CMX filles it with 'in'. I assume that can be corrected as the logic does not change (the length might be become an issue for some though)?
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Date format in realtime.txt

Post by mcrossley »

The way it has been implemented in MX it will generate using locale dependent date separators. :(

And to answer your question on the other thread, the realtime.txt seems to have always used "in" for "inHg", so changing it now may be an issue given how many other bits of code and templates use the realtime.txt file as input.
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Date format in realtime.txt

Post by HansR »

mcrossley wrote: Sat 19 Nov 2022 11:57 am The way it has been implemented in MX it will generate using locale dependent date separators. :(
OK, thnx
mcrossley wrote: Sat 19 Nov 2022 11:57 am And to answer your question on the other thread, the realtime.txt seems to have always used "in" for "inHg", so changing it now may be an issue given how many other bits of code and templates use the realtime.txt file as input.
Using realtime.txt is mostly done - if not always - after splitting it on the spaces so that would not be an issue.
If one uses a fixed space of 2, yes that might.

But I understand you are not contemplating to change this to give it the correct string?
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Date format in realtime.txt

Post by mcrossley »

Amazingly "in" (and "in/hr" for rate) is used virtually everywhere, including the config files, graph data etc. I'm surprised there have not been comments before. I suppose it is used as a config entry and decoded to "real" text on use.
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Date format in realtime.txt

Post by HansR »

I guess there is not many people using inHg as unit.
Anyway, you can leave it as is, I did a q&d fix in the RT javascript.
We don't want to disturb tradition don't we ;)
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Date format in realtime.txt

Post by mcrossley »

HansR wrote: Sat 19 Nov 2022 12:57 pm I guess there is not many people using inHg as unit.
Now you'll have every user in the USA jumping in!

But, yes I think that is the only country that still widely uses inHg
Post Reply