Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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

Recovering MX properly from locale issues

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
SamiS
Posts: 374
Joined: Sun 27 Feb 2011 5:13 pm
Weather Station: Ecowitt HP2551 & GW1100
Operating System: Raspberry Pi OS
Location: Kangasala, Finland

Recovering MX properly from locale issues

Post by SamiS »

I have been running Cumulus 1 on windows since 2010, and migrated to MX on Raspberry Pi many years ago. Until recently, I was running MX build 3062 on Raspbian Stretch with Mono 4.0.5.1. My locale is finnish, meaning my date separator has always been [.] and time separator [:], and this is still the way win10 handles finnish locale by default afaik.

However, officially finnish time separator is [.], and after upgrading my Pi to Raspbian Buster and Mono 6.10, for some reason my Cumulus installation wants to use the official time separator instead of the "commonly used" colon. This of course makes all my old data problematic.

I got Cumulus 3.7.0 up and running quite properly just by replacing time colons with dot on this current monthly datafile. But I presume, that this was only a very partial fix, since all monthly logfiles contain times with wrong separator, as does dayfile.txt. Should I edit and replace all data txt files? And what about monthly and yearly ini-files?

Or should I still try to re-configure my raspbian so that it uses colon as time separator like most of my data? And is this even possible, or are the locale settings coming from mono package and hardcoded inside it?
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Recovering MX properly from locale issues

Post by sfws »

SamiS wrote: Wed 05 Aug 2020 6:57 pm Should I edit and replace all data txt files? And what about monthly and yearly ini-files?
I can't answer this and most of your other questions, but
SamiS wrote: Wed 05 Aug 2020 6:57 pm And is this even possible, or are the locale settings coming from mono package and hardcoded inside it?
you can over-ride the mono locale - see https://cumuluswiki.org/a/Cumulus_3_(MX ... ing_Locale EDIT: Corrected link

Whether that is a sensible way forward for you, I also do not know. Hopefully, someone else will give you the advice you need.
Last edited by sfws on Sat 30 Jan 2021 9:50 pm, edited 1 time in total.
User avatar
mcrossley
Posts: 12763
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Recovering MX properly from locale issues

Post by mcrossley »

Unfortunately mono uses its own hardcode locale settings and ignores the system values :( And yes the latest version of mono changed lots of locales to match the "official" definitions.

Changing the locale you start CumulusMX with to one that uses your previous [.] and [:] separators sounds attractive, but be aware the locale also defines the decimal and list separators, and the month names. So probably a non starter.

So I think you are stuck with editing the files. As you are on Linux "sed" will be your friend I think!
SamiS
Posts: 374
Joined: Sun 27 Feb 2011 5:13 pm
Weather Station: Ecowitt HP2551 & GW1100
Operating System: Raspberry Pi OS
Location: Kangasala, Finland

Re: Recovering MX properly from locale issues

Post by SamiS »

Ok, thank you Mark, you confirmed what I already had kind of prepared myself into. As a windows guy from my background I'll maybe take look at powershell's import-csv and export-csv-functions. It is quite good on handling structured data on scripts, but I never have tried to actually manipulate the input data before exporting it. Sed is a tool I have never touched in any occasion. :?

However after reading wiki about log files, I am still a bit confused.

On wiki both Standard log files and Dayfile.txt do state very clearly, that colon is the only time separator accepted by MX. So if I edit all my data and logs to use [.] as time separator, all will not fall apart?

Could you also please confirm which files I absolutely must repair, and which are basically only "history" that is not processed by cumulus in any situation?

dayfile.txt - yes
mmmyyylog.txt - yes
alltimelog.txt and monthlyalltimelog - not necessary (looks like it just logs if something changed ?)
monthly and yearly ini files - (?)

The time and date format on ini files is different than in other files. Does this matter anything or should I edit all of those also?

One thing also came to my mind... One solution would be downgrading and freezing my mono version to a older one which still uses colon as finnish time separator. But this might cause problems later if you implement some new dotnet features in future builds? And of course it still would mean some editing to my data to remove all the time marking which are presently written with dot separator...
User avatar
mcrossley
Posts: 12763
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Recovering MX properly from locale issues

Post by mcrossley »

If it is writing the "." time separator in the file, then that is what it uses.

The ini files use their own date/time/decimal formats independent of your locale (hurrah!).
Post Reply