mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-06 11:18:36 +02:00
* Fix bug ID #27751 (Fill SystemTime.DayOfWeek)
git-svn-id: trunk@30384 -
This commit is contained in:
parent
8f569f4d88
commit
9ae76c3246
@ -216,8 +216,9 @@ end;
|
||||
|
||||
procedure DateTimeToSystemTime(DateTime: TDateTime; out SystemTime: TSystemTime);
|
||||
begin
|
||||
DecodeDate(DateTime, SystemTime.Year, SystemTime.Month, SystemTime.Day);
|
||||
DecodeDateFully(DateTime, SystemTime.Year, SystemTime.Month, SystemTime.Day,SystemTime.DayOfWeek);
|
||||
DecodeTime(DateTime, SystemTime.Hour, SystemTime.Minute, SystemTime.Second, SystemTime.MilliSecond);
|
||||
Dec(SystemTime.DayOfWeek);
|
||||
end ;
|
||||
|
||||
{ SystemTimeToDateTime converts SystemTime to a TDateTime value }
|
||||
|
@ -93,7 +93,7 @@ type
|
||||
{$if not(defined(windows)) and not(defined(win32))}
|
||||
{ Win32 reuses the struct from the Windows unit }
|
||||
TSystemTime = record
|
||||
Year, Month, Day: word;
|
||||
Year, Month, Day, DayOfWeek: word;
|
||||
Hour, Minute, Second, MilliSecond: word;
|
||||
end ;
|
||||
{$endif windows}
|
||||
|
Loading…
Reference in New Issue
Block a user