[fpc-devel] StrToDateTime and ShortDateFormat = 'd. M. yyyy'

Petr Kristan petr.kristan at epos.cz
Tue Jun 17 17:20:22 CEST 2014


In our country in Windows 8 is preset default short date format "d. M. rrrr"

In fpc:
DefaultFormatSettings.ShortDateFormat is set to 'd. M. yyyy'
DefaultFormatSettings.DateSeparator = '.'

StrToDateTime('1. 1. 2000 12:00') has problem because
func SplitDateTimeStr scans input string forward to find WhiteSpace.

I Delphi7 StrToDateTime works correctly.

After short look at rtl code I do not see any solution with
SplitDateTimeStr. I think that correct solution is to first try parse
date without splitting and then parse remaining optional time.

I can try to do that, but are there any StrToDateTime tests?
I do not want to break what is working until now.


Petr Kristan
EPOS PRO s.r.o., Smilova 333, 530 02 Pardubice
tel: +420 461101401    Czech Republic (Eastern Europe)
fax: +420 461101481

More information about the fpc-devel mailing list