Browse Source

* fixes StrToTime() thanks to jesus

git-svn-id: trunk@5100 -
Almindor 19 years ago
parent
commit
0c6e1e4c44
1 changed files with 2 additions and 2 deletions
  1. 2 2
      rtl/objpas/sysutils/dati.inc

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

@@ -476,7 +476,7 @@ while (i < 5) and (TimeValues[i] <> -1) do begin
    end ;
 If (i<5) and (TimeValues[I]=-1) then
   TimeValues[I]:=0;
-if PM then Inc(TimeValues[0], 12);
+if PM and (TimeValues[0] <> 12) then Inc(TimeValues[0], 12);
 result := EncodeTime(TimeValues[0], TimeValues[1], TimeValues[2], TimeValues[3]);
 end ;
 
@@ -836,4 +836,4 @@ procedure ReplaceTime(var dati:TDateTime; NewTime : TDateTime);
 
 begin
   dati:=trunc(dati)+frac(newtime);
-end;
+end;