mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-01 00:30:56 +02:00
* Modification after feedback on #20454, last patch was a bit conservative.
git-svn-id: trunk@20459 -
This commit is contained in:
parent
4ea56bd875
commit
49e3a24413
@ -505,7 +505,7 @@ begin
|
||||
Delete(S,1,P);
|
||||
end;
|
||||
|
||||
Function ParseSQLiteDate(S : ShortString;sepc:ansichar=' ') : TDateTime;
|
||||
Function ParseSQLiteDate(S : ShortString) : TDateTime;
|
||||
|
||||
Var
|
||||
Year, Month, Day : Integer;
|
||||
@ -513,7 +513,7 @@ begin
|
||||
Result:=0;
|
||||
If TryStrToInt(NextWord(S,'-'),Year) then
|
||||
if TryStrToInt(NextWord(S,'-'),Month) then
|
||||
if TryStrToInt(NextWord(S,sepc),Day) then
|
||||
if TryStrToInt(NextWord(S,' '),Day) then
|
||||
Result:=EncodeDate(Year,Month,Day);
|
||||
end;
|
||||
|
||||
@ -559,7 +559,7 @@ begin
|
||||
else if (Pos(':',S)<>0) then
|
||||
TS:=S;
|
||||
end;
|
||||
Result:=ComposeDateTime(ParseSQLiteDate(DS,'-'),ParseSQLiteTime(TS,False));
|
||||
Result:=ComposeDateTime(ParseSQLiteDate(DS),ParseSQLiteTime(TS,False));
|
||||
end;
|
||||
|
||||
function TSQLite3Connection.LoadField(cursor : TSQLCursor;FieldDef : TfieldDef;buffer : pointer; out CreateBlob : boolean) : boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user