You are not logged in.
Pages: 1
The TSystemTime record in Winapi.Windows defained as:
_SYSTEMTIME = record
wYear: Word;
wMonth: Word;
wDayOfWeek: Word;
wDay: Word;
wHour: Word;
wMinute: Word;
wSecond: Word;
wMilliseconds: Word;
end;
The TSynSystemTime defained as:
TSynSystemTime = {$ifdef ISDELPHI2006ANDUP}record{$else}object{$endif}
Year, Month, Day, DayOfWeek,
Hour, Minute, Second, MilliSecond: word;
See the wrong order of Day and DayOfWeek in TSynSystemTime declaration
So function FromNowUTC returns 3/5/2018 11:17:25 AM instead of 3/23/2018 11:17:25 AM
procedure TSynSystemTime.FromNowUTC;
begin
{$ifdef MSWINDOWS}
GetSystemTime(TSystemTime(self)); // this API is fast enough for our purpose
{$else}
GetNowUTCSystem(TSystemTime(self));
{$endif}
end;
Offline
Oups....
Please check https://synopse.info/fossil/info/c97a77cf9c
Edit:
In fact, the format we followed was the one used by FPC... which is not compatible with the one from the Windows unit!
So we need to fix the code to support FPC non Windows platforms.
See https://synopse.info/fossil/info/6bb8a92474
Offline
Thanks, fix works fine.
Offline
Pages: 1