Page 1 of 1

Time format

Posted: Wed 15 Jan 2014 7:03 pm
by laulau
Hi,
How does Cumulus write time in log files in 12h format ?

Re: Time format

Posted: Wed 15 Jan 2014 7:12 pm
by steve
It always uses 24-hour format, as is correct for meteorology. Or it should do, anyway. Anywhere that Cumulus doesn't use 24-hour time is unintentional - I know a few got through by accident in some of the displays and use the Windows system format.

But I can't change the formats of dates or times in the log files now anyway.

Re: Time format

Posted: Wed 15 Jan 2014 8:11 pm
by laulau
So if I understand well to convert "15/01/14 12:30 p 53.0 (etc)" to Cumulus log format the result should be "15/01/14,00:30, (etc)"?

Re: Time format

Posted: Wed 15 Jan 2014 8:16 pm
by steve
laulau wrote:So if I understand well to convert "15/01/14 12:30 p 53.0 (etc)" to Cumulus log format the result should be "15/01/14,00:30, (etc)"?
Ah, I see, you're converting files.

Yes, the date has to be dd/mm/yy (but the slash could be any other valid date separator), and the time has to be hh:mm.

"12:30 p" is in the afternoon (pm), so it's 12:30, not 00:30

Re: Time format

Posted: Wed 15 Jan 2014 8:28 pm
by laulau
Yes indeed :bash:
Thanks

Re: Time format

Posted: Sat 01 Feb 2014 6:18 am
by tmc4242
I have my Win7 system date format set to ddd MM/dd/yy

Cumulus will start normally if I delete the data directory and reinstall. Once.

Restarts cause a crash.

exception number : 1
exception class : EVariantTypeCastError
exception message : Could not convert variant of type (UnicodeString) into type (Date).

( entire bugreport file available if wanted. )

Seems this should be an error check and a stripping off of the day label first. Can that be implemented ?

Re: Time format

Posted: Sat 01 Feb 2014 8:06 am
by steve
I have my Win7 system date format set to ddd MM/dd/yy
Is that your short date format?

Please zip up the diags folder and attach it, together with the bugreport.txt file.

Re: Time format

Posted: Sat 01 Feb 2014 8:20 am
by tmc4242
Confirm. Short date format, displaying in the toolbar as Sat 02/01/14

Error repeatably reproduced as well.

Re: Time format

Posted: Sat 01 Feb 2014 8:32 am
by steve
It looks like your short date format is actually "ddd MM dd yy". It could just be that Windows sees the first space and sets the date separator to a space, so the format that Cumulus gets has all spaces in it:

Sat 02 01 14 00:07:17.933 : Short date format: Sat 02 01 14
Sat 02 01 14 00:07:17.933 : Long date format: 01 February, 2014

In the place where it's crashing, it's using Windows routines to interpret the dates in the today.ini file which were written earlier using Windows routines, and apparently Windows is unable to recognise the strings that it wrote itself as dates.

In addition, Cumulus itself won't work with a short date format which has spaces in it, it expects one of the standard regional formats with a separator that isn't a space. The entries in the log files will have spaces in the dates, and this will cause problems when reading the data back in at start up.

It would be a large change to get Cumulus to work with a short date format with a space in it, including writing my own routines to replace the standard Windows ones, which themselves don't handle the spaces in the date format; so I'm afraid it's not something I'll be able to do any time soon - sorry.

Re: Time format

Posted: Sat 01 Feb 2014 8:44 am
by tmc4242
My date format is exactly as I said. Only one space, that after "ddd". The rest of the delinators are the usual "/".

Replacing the space with a "-" changed nothing, for whatever that's worth.

Thanks for taking a look.