Browse Source

* Patch from Werner Pamler to fix count of digits in periods

git-svn-id: trunk@49299 -
(cherry picked from commit 5cde6facdb15f08e636b32eafa3928e54758937c)
michael 4 years ago
parent
commit
5d7ba48f53
1 changed files with 3 additions and 3 deletions
  1. 3 3
      rtl/objpas/sysutils/dati.inc

+ 3 - 3
rtl/objpas/sysutils/dati.inc

@@ -1130,7 +1130,7 @@ var
             end ;
             'H':
               if isInterval then
-                StoreInt(Hour + trunc(abs(DateTime))*24, 0)
+                StoreInt(Hour + trunc(abs(DateTime))*24, Count)
               else
               if Clock12 then
               begin
@@ -1148,14 +1148,14 @@ var
                   StoreInt(Hour, 2);
               end;
             'N': if isInterval then
-                   StoreInt(Minute + (Hour + trunc(abs(DateTime))*24)*60, 0)
+                   StoreInt(Minute + (Hour + trunc(abs(DateTime))*24)*60, Count)
                  else
                  if Count = 1 then
                    StoreInt(Minute, 0)
                  else
                    StoreInt(Minute, 2);
             'S': if isInterval then
-                   StoreInt(Second + (Minute + (Hour + trunc(abs(DateTime))*24)*60)*60, 0)
+                   StoreInt(Second + (Minute + (Hour + trunc(abs(DateTime))*24)*60)*60, Count)
                  else
                  if Count = 1 then
                    StoreInt(Second, 0)