Set system time WinCE lazarus / 35-Windows CE ---------------------------------------------------------------------- ertank · 2016-04-23 07:32 Is there any code sample for changing WinCE system date time? I couldn't find an post in the forum. ---------------------------------------------------------------------- Thaddy · 2016-04-23 08:37 http://www.festra.com/eng/snip07.htm Works also for wince. As does this: http://www.delphitricks.com/source- code/windows/change_the_system_time.html ---------------------------------------------------------------------- ertank · 2016-04-26 19:05 Quote from: Thaddy on April 23, 2016, 10:37:15 amhttp://www.festra.com/eng/snip07.htm Works also for wince. As does this: http://www.delphitricks.com/source- code/windows/change_the_system_time.html Above links, I do not know which unit to import for "SetLocalTime". It is not known and compiler throws an error. ---------------------------------------------------------------------- ertank · 2016-04-26 19:19 Ok, Seems like I need to add "Windows" unit in uses clause. Below code works fine for me Code: [Select]uses Windows; procedure TForm1.Button3Click(Sender: TObject); var   dt:TSystemTime; begin   dt.wYear := StrToInt(FormatDateTime('yyyy', now));   dt.wMonth := StrToInt(FormatDateTime('mm', now));   dt.wDay := StrToInt(FormatDateTime('dd', now));   dt.wHour := StrToInt(Edit1.Text);   dt.wMinute := StrToInt(Edit2.Text);   dt.wSecond := StrToInt(Edit3.Text);   dt.wMilliseconds := 0;   SetLocalTime(dt); end;