Hello FreePascal developers,
I believe that since SVN commit 30628 UniversalTimeToLocal(UT: TDateTime) and LocalTimeToUniversal(LT: TDateTime) are reporting incorrect values. The multiple parameter versions of these functions had their offset handling changed to a more expected format as described in bug id 24752 [1]. The single parameter versions call GetLocalTimeOffset, which ultimately calls GetTimeZoneInformation. This function returns the 'bias', where: UTC = local time + bias [2]. The bias needs to be inverted before being sent to the new UniversalTimeToLocal/LocalTimeToUniversal functions. Please consider the attached patch. Thank you. [1] http://mantis.freepascal.org/view.php?id=24752 [2] https://msdn.microsoft.com/en-us/library/windows/desktop/ms724421(v=vs.85).aspx
dateutil.inc.patch
Description: Binary data
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal