Explorar o código

* Fix DateTimeToUnix, needs trunc instead of round (see bug ID #30697)

git-svn-id: trunk@34983 -
michael %!s(int64=8) %!d(string=hai) anos
pai
achega
783f53d3a7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/rtl-objpas/src/inc/dateutil.inc

+ 1 - 1
packages/rtl-objpas/src/inc/dateutil.inc

@@ -2149,7 +2149,7 @@ end;
 
 Function DateTimeToUnix(const AValue: TDateTime): Int64;
 begin
-  Result:=Round(DateTimeDiff(AValue,UnixEpoch)*SecsPerDay);
+  Result:=Trunc(DateTimeDiff(AValue,UnixEpoch)*SecsPerDay);
 end;