Browse Source

+ also fill DayOfWeek in the Unix implementation of SysUtils.GetLocalTime

Nikolay Nikolov 3 years ago
parent
commit
f21273612a
1 changed files with 1 additions and 0 deletions
  1. 1 0
      rtl/unix/sysutils.pp

+ 1 - 0
rtl/unix/sysutils.pp

@@ -1432,6 +1432,7 @@ var
   usecs : Word;
   usecs : Word;
 begin
 begin
   DoGetLocalDateTime(SystemTime.Year, SystemTime.Month, SystemTime.Day,SystemTime.Hour, SystemTime.Minute, SystemTime.Second, SystemTime.MilliSecond, usecs);
   DoGetLocalDateTime(SystemTime.Year, SystemTime.Month, SystemTime.Day,SystemTime.Hour, SystemTime.Minute, SystemTime.Second, SystemTime.MilliSecond, usecs);
+  SystemTime.DayOfWeek:=DayOfWeek(EncodeDate(SystemTime.Year,SystemTime.Month,SystemTime.Day))-1;
 end ;
 end ;
 {$endif}
 {$endif}