Page 1 of 1

date format in realtime.txt

Posted: Tue 01 Sep 2015 9:19 pm
by BCJKiwi
Forgive me if this has already been covered but if so, I could not find it.

I know (and I believe I understand) the issues around the changes to the date formatting codes for MX web tags.

However I have always understood the format of date and time in realtime.txt was fixed and did not depend on the settings in windows other than in relation to the separator.

All my Windows systems for C1 and MX have always had a short date format of d/MM/YY and the day in the date in realtime.txt has always had a leading 0 if the day is less than 10.

On assisting another CumulusMX user with a custom PHP script we found a problem arose as the date in their realtime.txt did NOT have the leading 0 - their windows short date format was the same as mine. Once they changed their windows short date format to dd/MM/YY, the issue was resolved.

Is this expected behaviour? If so is there any apparent explanation for the two systems behaving differently?

Re: date format in realtime.txt

Posted: Wed 02 Sep 2015 7:04 am
by steve
The code in Cumulus 1 uses this Delphi format string for the date and time in realtime.txt - 'dd/mm/yy hh:mm:ss'

As you can see from this page, that gives the day with 2 digits - http://docwiki.embarcadero.com/Librarie ... atDateTime

The code in Cumulus MX uses this .Net format string for the date and time in realtime.txt - "dd/MM/yy HH:mm:ss"

As you can see from this page, that gives the day with 2 digits - https://msdn.microsoft.com/en-us/librar ... .110).aspx

So I have no explanation to offer, other than perhaps they were not using the built-in realtime.txt file, but a 'custom' one instead?

Re: date format in realtime.txt

Posted: Wed 02 Sep 2015 11:30 am
by BCJKiwi
Thanks Steve.

Great explanation/confirmation.