<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Courier New, Courier, monospace">Hi,<br>
<br>
My local time zone is GMT +2, and have noticed that with V3.0.0,
that the LocalTimeToUniversal() function is adding the offset
instead of subtracting it:<br>
<br>
uses sysutils, dateutils;<br>
var<br>
LocalTime: TDateTime;<br>
begin<br>
LocalTime := Now();<br>
writeln('Offset :', GetLocalTimeOffset());<br>
writeln('Local Time :', TimeToStr(LocalTime));<br>
writeln('UTC :',
TimeToStr(LocalTimeToUniversal(LocalTime)));<br>
end.<br>
<br>
Under 2.6.4 produces:<br>
<br>
Offset : -120<br>
Local Time : 05:29:13<br>
UTC : 03:29:13<br>
<br>
With 3.0.0:<br>
<br>
Offset :-120<br>
Local Time :05:31:16<br>
UTC :07:31:16<br>
<br>
Comparing dateutil.inc for both versions, in functions
UniversalTimeToLocal() and LocalTimeToUniversal() the signs of the
offsets have been changed<br>
<br>
Thanks<br>
Russell<br>
<br>
<br>
<br>
<br>
<br>
</font>
</body>
</html>