Skip to content

Commit

Permalink
Merge pull request #139 from chacalfloripa/master
Browse files Browse the repository at this point in the history
Correção de erro "Error: Can't determine which overloaded function to…
  • Loading branch information
viniciussanchez committed Feb 23, 2022
2 parents 062a2cc + 6338088 commit ad16010
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DataSet.Serialize.Import.pas
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,15 @@ procedure TJSONSerialize.JSONObjectToDataSet(const AJSONObject: TJSONObject; con
begin
if LJsonValue.InheritsFrom(TJSONNumber) then
LTryStrToDateTime := StrToFloatDef(LJSONValue.Value, 0)
else if not TryStrToDateTime(LJSONValue.Value, LTryStrToDateTime) then
else if not TryStrToDateTime(VarToStr(LJSONValue.Value), LTryStrToDateTime) then
LTryStrToDateTime := ISO8601ToDate(LJSONValue.Value, TDataSetSerializeConfig.GetInstance.DateInputIsUTC);
LField.AsDateTime := DateOf(LTryStrToDateTime);
end;
TFieldType.ftTimeStamp, TFieldType.ftDateTime:
begin
if LJSONValue.InheritsFrom(TJSONNumber) then
LTryStrToDateTime := StrToFloatDef(LJSONValue.Value, 0)
else if not TryStrToDateTime(LJSONValue.Value, LTryStrToDateTime) then
else if not TryStrToDateTime(VarToStr(LJSONValue.Value), LTryStrToDateTime) then
LTryStrToDateTime := ISO8601ToDate(LJSONValue.Value, TDataSetSerializeConfig.GetInstance.DateInputIsUTC);
LField.AsDateTime := LTryStrToDateTime;
end;
Expand Down

0 comments on commit ad16010

Please sign in to comment.