From 0c6e1e4c44ff5e07a11cfadb2887f510cd5a460c Mon Sep 17 00:00:00 2001 From: Almindor Date: Mon, 30 Oct 2006 22:52:56 +0000 Subject: [PATCH] * fixes StrToTime() thanks to jesus git-svn-id: trunk@5100 - --- rtl/objpas/sysutils/dati.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtl/objpas/sysutils/dati.inc b/rtl/objpas/sysutils/dati.inc index a4335e3ec4..7a4f93598a 100644 --- a/rtl/objpas/sysutils/dati.inc +++ b/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; \ No newline at end of file +end;