[fpc-pascal] FPC GO32 2.6.2 wrong result from SecondsBetween
Lubomír Čabla
kladno at gmail.com
Tue Sep 17 17:55:26 CEST 2013
I am doing something wrong?
When I encode the date and time then for SecondsBetween
I get 59 instead of 60 and for MilliSecondsBetween also.
When I encode only time then for SecondsBetween I get correct answer 60.
Free Pascal Compiler version 2.6.2 [2013/02/12] for i386
Target: GO32 v2, i386
Results from dt.pp:
ShortDateFormat=d/m/y
LongDateFormat=dd" "mmmm" "yyyy
ShortTimeFormat=hh:nn
LongTimeFormat=hh:nn:ss
Encode date and time:
DateTime DT1= 28.05.2013 15:26:01:0
DateTime DT2= 28.05.2013 15:27:01:0
Between DT2-DT1= 0.0:0:59:59999
Encode time only:
DateTime DT1= 30.12.1899 15:26:01:0
DateTime DT2= 30.12.1899 15:27:01:0
Between DT2-DT1= 0.0:1:60:60000
Btw. FormatDateTime('dd.mm.yyyy hh:nn:ss:z',DT1));
the result is the same with the use 'mm' instead of 'nn' for minutes:
FormatDateTime('dd.mm.yyyy hh:mm:ss:z',DT1));
Lubomir Cabla
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130917/56b36d3e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dt.pp
Type: application/octet-stream
Size: 1297 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130917/56b36d3e/attachment.obj>
More information about the fpc-pascal
mailing list