On Tue, 20 Oct 2009, Graeme Geldenhuys wrote:

On 20/10/2009, Michael Van Canneyt <mich...@freepascal.org> wrote:

 You make a common assumption, which is mistaken:
 StrToDate(DateToStr(date)) generally does not work.

Crap!  And that is pretty much what the tiOPF unit test is testing for.

So why is StrToDate() so different to Delphi? In Delphi, the above
mentioned code works.

Pure coincidence.

See the help of StrToDate in Delphi, it works 100% the same - as documented.
Maybe they are more forgiving concerning the time part.

And to make matters worse, the tiOPF code is compiled with "$mode
delphi" enabled.

That should have no effect whatsoever.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to