<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 27, 2015 at 3:46 PM, silvioprog <span dir="ltr"><<a href="mailto:silvioprog@gmail.com" target="_blank">silvioprog@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hello,<br clear="all"><div><br></div><div>This code works fine in Delphi 7 / XE 7:</div><div><br></div><div><div>var</div><div> D: TDateTime;</div><div> S: string;</div><div>begin</div><div> D := MaxDateTime;</div><div> S := DateTimeToStr(D);</div><div>end; </div></div><div><div><br></div><div>Return: 12/31/9999 11:59:59 PM.</div><div><br></div></div><div>But, in FPC (from trunk), I got a EConvertError:</div><div><br></div><div>2958466,00 is not a valid TDatetime encoding, maximum value is 2958466,00<br></div><div><br></div><div>Is this a bug?</div><div><br></div><div>PS: same problem using DateTimeToString directly.</div></div></blockquote></div><div><br></div><div>Now I tested this code in FPC 2.6.4 and it worked fine, so it seems a bug in FPC from trunk (Lazarus 1.5 rUnknown FPC 3.1.1 i386-win32-win32/win64).</div><div><br></div>-- <br><div class="gmail_signature">Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a></div>
</div></div>