Result datetime has 1 day difference when returning only a date

Hi,

I get 1 day difference as result when returning datetime from my restservice,

Like so:
[ROServiceMethod]
[ROCustom(‘HttpApiPath’,‘TestDate’)]
[ROCustom(‘HttpApiMethod’,‘GET’)]
function TestDate:TDateTime;

function TTestService.TestDate: TDateTime;
begin
Result:=EncodeDate(2020,3,27);
end;

When calling this, the result is: 2020-03-26T23:00:00Z
1 day difference.
If I include the time part (result=Now), the answer is correct: 2020-03-27T06:49:25.819Z
I have this result with 10.0.0.1449 and 10.0.0.1471
I assume this is a bug?

Regards, Piet

Remobjects SDK
Delphi 10.3.2

Hi,
No, this isn’t a bug.
we return date in UTC format, so 2020-03-26T23:00:00Z means 2020-03-26 23:00 UTC+0.
this one is equal to 2020-03-27 00:00 UTC+1.

you can read about this in RFC 3339 - Date and Time on the Internet: Timestamps

Ah! Thanks EvgenyK.