Kaynağa Gözat

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

git-svn-id: trunk@34983 -
michael 8 yıl önce
ebeveyn
işleme
783f53d3a7
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  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;