Why is LocalTimeToUniversal(Now) two hours later with Lazarus 1.6 / FPC 3.0?

605 Views Asked by At

My local time zone is UTC+1, so when it is 16:30 here, this line

ShowMessage(DateTimeToStr(LocalTimeToUniversal(Now)));

displays the correct value "12.12.2015 15:30" with Lazarus 1.4.2 / Free Pascal 2.6.4.

With Free Pascal 3.0.0 (Lazarus 1.6RC1) it displays "12.12.2015 17:30", two hours later. Do I miss something in the migration from FPC 2.6 to 3.0, or is it a bug?

In both cases, GetLocalTimeOffset returns -60.

1

There are 1 best solutions below

0
mjn On BEST ANSWER

It seems to be a bug in the Free Pascal 3.0.0 RTL.

freepascal bugtracker: http://mantis.freepascal.org/view.php?id=29176

(update: it is fixed in 3.1.1, target version is 3.0.2)