Browse Source

* Mantis #21995, rewrite mantis #17199 changes (IB datetime milliseconds)
using composedatetime.

git-svn-id: trunk@21265 -

marco 13 years ago
parent
commit
343b8e299c
1 changed files with 4 additions and 5 deletions
  1. 4 5
      packages/fcl-db/src/sqldb/interbase/ibconnection.pp

+ 4 - 5
packages/fcl-db/src/sqldb/interbase/ibconnection.pp

@@ -1056,11 +1056,10 @@ begin
       {$IFNDEF SUPPORT_MSECS}
       {$IFNDEF SUPPORT_MSECS}
       isc_decode_timestamp(PISC_TIMESTAMP(CurrBuff), @CTime);
       isc_decode_timestamp(PISC_TIMESTAMP(CurrBuff), @CTime);
       {$ELSE}
       {$ELSE}
-      PTime := PISC_TIMESTAMP(CurrBuff)^.timestamp_date - IBDateOffset;
-      if PTime < 0 then
-        PTime := PTime - PISC_TIMESTAMP(CurrBuff)^.timestamp_time / IBSecsCount
-      else
-        PTime := PTime + PISC_TIMESTAMP(CurrBuff)^.timestamp_time / IBSecsCount;
+      PTime := ComposeDateTime(
+                  PISC_TIMESTAMP(CurrBuff)^.timestamp_date - IBDateOffset,
+                  PISC_TIMESTAMP(CurrBuff)^.timestamp_time / IBSecsCount
+               );
       {$ENDIF}
       {$ENDIF}
       end
       end
   else
   else