[fpc-pascal] DateTimeToStr: 2958466, 00 is not a valid TDatetime encoding, maximum value is 2958466, 00
silvioprog
silvioprog at gmail.com
Thu May 28 00:38:29 CEST 2015
On Wed, May 27, 2015 at 6:22 PM, Michael Van Canneyt <michael at freepascal.org
> wrote:
>
> On Wed, 27 May 2015, silvioprog wrote:
>
>> Hello,
>>
>> This code works fine in Delphi 7 / XE 7:
>>
>> var
>> D: TDateTime;
>> S: string;
>> begin
>> D := MaxDateTime;
>> S := DateTimeToStr(D);
>> end;
>>
>> Return: 12/31/9999 11:59:59 PM.
>>
>> But, in FPC (from trunk), I got a EConvertError:
>>
>> 2958466,00 is not a valid TDatetime encoding, maximum value is 2958466,00
>>
>> Is this a bug?
>>
>
> Yes. Please report it in the bugtracker.
>
> Michael.
Done:
http://bugs.freepascal.org/view.php?id=28195
Also sent the patch to fix the problem.
Thank you!
--
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150527/1889a003/attachment.html>
More information about the fpc-pascal
mailing list