Browse Source

* Proper fix for bug ID #30697

git-svn-id: trunk@34997 -
michael 8 years ago
parent
commit
5786182188
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/rtl-objpas/src/inc/dateutil.inc

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

@@ -2148,8 +2148,9 @@ end;
   ---------------------------------------------------------------------}
   ---------------------------------------------------------------------}
 
 
 Function DateTimeToUnix(const AValue: TDateTime): Int64;
 Function DateTimeToUnix(const AValue: TDateTime): Int64;
+
 begin
 begin
-  Result:=Trunc(DateTimeDiff(AValue,UnixEpoch)*SecsPerDay);
+  Result:=Round(DateTimeDiff(RecodeMillisecond(AValue,0),UnixEpoch)*SecsPerDay);
 end;
 end;