mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-25 13:59:12 +02:00
fixed wrong Frac/Trunc in DecodeDate/Time
git-svn-id: branches/fixes_1_4@47642 -
This commit is contained in:
parent
6dfe26c640
commit
85d935d111
components
@ -1883,9 +1883,9 @@ begin
|
||||
'H','N','S','Z': NeedTime:=true;
|
||||
end;
|
||||
if NeedDate then
|
||||
DecodeDate(Trunc(Date),Year,Month,Day);
|
||||
DecodeDate(Date,Year,Month,Day);
|
||||
if NeedTime then
|
||||
DecodeTime(Frac(Date),Hour,Minute,Second,MilliSecond);
|
||||
DecodeTime(Date,Hour,Minute,Second,MilliSecond);
|
||||
p:=1;
|
||||
while p<=length(aFormat) do begin
|
||||
case aFormat[p] of
|
||||
|
@ -1029,8 +1029,8 @@ begin
|
||||
exit;
|
||||
end;
|
||||
DT := FileDateToDateTimeDef(t);
|
||||
DecodeTime(Frac(DT),hour,min,sec,hsec);
|
||||
DecodeDate(Trunc(DT),year,month,day);
|
||||
DecodeTime(DT,hour,min,sec,hsec);
|
||||
DecodeDate(DT,year,month,day);
|
||||
Result := L0(Year)+'/'+L0(Month)+'/'+L0(Day)+' '+L0(Hour)+':'+L0(min)+':'+L0(sec);
|
||||
end;
|
||||
|
||||
|
@ -1341,7 +1341,7 @@ begin
|
||||
MiliSec := 0;
|
||||
end;
|
||||
end else
|
||||
DecodeTime(Frac(FDateTime), Result.Hour, Result.Minute, Result.Second, Result.MiliSec);
|
||||
DecodeTime(FDateTime, Result.Hour, Result.Minute, Result.Second, Result.MiliSec);
|
||||
end;
|
||||
|
||||
function TCustomDateTimePicker.GetYYYYMMDD(const TodayIfNull: Boolean;
|
||||
@ -2729,7 +2729,7 @@ begin
|
||||
else
|
||||
FTextPart[FDayPos] := IntToStr(W[1]);
|
||||
|
||||
DecodeTime(Frac(FDateTime), WT[dtpHour], WT[dtpMinute], WT[dtpSecond], WT[dtpMiliSec]);
|
||||
DecodeTime(FDateTime, WT[dtpHour], WT[dtpMinute], WT[dtpSecond], WT[dtpMiliSec]);
|
||||
|
||||
if dtpAMPM in FEffectiveHideDateTimeParts then
|
||||
FTimeText[dtpAMPM] := ''
|
||||
|
Loading…
Reference in New Issue
Block a user