found bug on GetLocalTimeOffset lazarus / 64-FPC development ---------------------------------------------------------------------- herux · 2016-04-27 07:16 Hi all, I think i found bug on GetLocalTimeOffset, This method is in SysUtils unit. they did not response correctly  , when I access method Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i LocalTimeToUniversal(Now, GetLocalTimeOffset); Here, in my country, localtime is GMT+7, so the integer value is 420, but GetLocalTimeOffset return -420 LocalTimeToUniversal code is here .. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Function LocalTimeToUniversal(LT: TDateTime;TZOffset: Integer): TDateTime; begin  if (TZOffset > 0) then    Result := LT - EncodeTime(TZOffset div 60, TZOffset mod 60, 0, 0)  else if (TZOffset < 0) then    Result := LT + EncodeTime(Abs(TZOffset) div 60, Abs(TZOffset) mod 60, 0, 0)  else    Result := LT;end; I tried it on Windows 8.1 and Mac OS X El-Capitan, fpc 3.0.0 herux ---------------------------------------------------------------------- balazsszekely · 2016-04-27 07:41 Please read this, maybe you'll find some relevant info: http://bugs.freepascal.org/view.php?id=28534 http://bugs.freepascal.org/view.php?id=29193 ---------------------------------------------------------------------- herux · 2016-04-28 02:02 bugtracker said it was resolved to FPC target version 3.0.0 , I am using it now, why is it still happening ? ---------------------------------------------------------------------- balazsszekely · 2016-04-28 04:19 Then reopen the bug, attach a test project(source only) zipped, which reproduce the error. ---------------------------------------------------------------------- herux · 2016-04-28 04:28 Okey, I will do that, thank you @GetMem ---------------------------------------------------------------------- Jonas Maebe · 2016-05-03 09:50 The first bug report was marked as fixed in FPC 3.0, but it was fixed wrongly. That's what the second bug report is about, and that bug will be fixed in FPC 3.0.2