<div dir="ltr">I have some code at home I use that reads the TZ stuff from Windows and then does its calculations etc.<div>I will fire it thru when I get home if you have no joy.</div><div><br></div><div>Jeremy</div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 3, 2014 at 1:39 PM, Rodney <span dir="ltr">&lt;<a href="mailto:rchan@compuspec.com" target="_blank">rchan@compuspec.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Probably can have a look at these links:<br>
<br>
<a href="http://stackoverflow.com/questions/3448983/delphi-equivalent-to-c-sharp-date
time-isdaylightsavingtime-method-needed" target="_blank">http://stackoverflow.com/questions/3448983/delphi-equivalent-to-c-sharp-date<br>
time-isdaylightsavingtime-method-needed</a><br>
<br>
<a href="http://code.google.com/p/delphi-tzdb/" target="_blank">http://code.google.com/p/delphi-tzdb/</a><br>
<br>
<br>
Rodney<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</a><br>
[mailto:<a href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</a>] On Behalf Of<br>
<a href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a><br>
Sent: Thursday, 3 April 2014 12:00 p.m.<br>
To: <a href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
Subject: Delphi Digest, Vol 126, Issue 5<br>
<br>
Send Delphi mailing list submissions to<br>
        <a href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://listserver.123.net.nz/mailman/listinfo/delphi" target="_blank">http://listserver.123.net.nz/mailman/listinfo/delphi</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:delphi-owner@listserver.123.net.nz">delphi-owner@listserver.123.net.nz</a><br>
<br>
When replying, please edit your Subject line so it is more specific than<br>
&quot;Re: Contents of Delphi digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: Daylight savings (Robo)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 3 Apr 2014 00:49:01 +0200<br>
From: Robo &lt;<a href="mailto:robo555@gmail.com">robo555@gmail.com</a>&gt;<br>
Subject: Re: [DUG] Daylight savings<br>
To: NZ Borland Developers Group - Delphi List<br>
        &lt;<a href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a>&gt;<br>
Message-ID:<br>
        &lt;CAJLpVUM1Kd98B0xTyTRF-R8atWtqK2usPaypKX6xprkSh=<a href="mailto:Pqyg@mail.gmail.com">Pqyg@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<div><div class="h5"><br>
NZ changed the day light saving week a few years ago, hence the incorrect<br>
calculation on older version of Delphi. Easiest way would probably be to<br>
copy XE5&#39;s source code.<br>
<br>
Robo<br>
<br>
<br>
On Thu, Apr 3, 2014 at 12:30 AM, Alister Christie &lt;<br>
<a href="mailto:alister@salespartner.co.nz">alister@salespartner.co.nz</a>&gt; wrote:<br>
<br>
&gt; I&#39;ve noticed in Delphi XE that TTimeZone.Local.ToUniversalTime is a<br>
&gt; week out on daylight savings, it works correctly in XE5 however (and<br>
&gt; probably earlier versions).<br>
&gt;<br>
&gt; program Project6;<br>
&gt;<br>
&gt; {$APPTYPE CONSOLE}<br>
&gt;<br>
&gt; uses<br>
&gt;   SysUtils,<br>
&gt;   DateUtils;<br>
&gt;<br>
&gt; begin<br>
&gt;   Writeln(DateTimeToStr(TTimeZone.Local.ToUniversalTime(StrToDateTime(<br>
&gt; &#39;5/4/2014 2pm&#39;))));<br>
&gt;   Writeln(DateTimeToStr(TTimeZone.Local.ToUniversalTime(StrToDateTime(<br>
&gt; &#39;12/4/2014 2pm&#39;))));<br>
&gt;   Readln;<br>
&gt; end.<br>
&gt;<br>
&gt;<br>
&gt; Outputs<br>
&gt;<br>
&gt; 5/04/2014 1:00:00 a.m.<br>
&gt; 6/04/2014 1:00:00 a.m.<br>
&gt;<br>
&gt; in XE (incorrectly) and<br>
&gt;<br>
&gt; 5/04/2014 1:00:00 a.m.<br>
&gt; 6/04/2014 2:00:00 a.m.<br>
&gt;<br>
&gt; in XE5 (correctly).  XE works correctly from the 13th onwards - so<br>
&gt; it&#39;s just a problem for a week.<br>
&gt;<br>
&gt; Does anyone have some code that does conversions to UTC correctly for<br>
&gt; Delphi XE?<br>
&gt;<br>
&gt; Alister Christie<br>
&gt; Computers for People<br>
</div></div>&gt; Ph: 04 471 1849 Fax: 04 471 1266<a href="http://www.salespartner.co.nz" target="_blank">http://www.salespartner.co.nz</a> Follow<br>
<div class="">&gt; us on Twitter <a href="http://twitter.com/salespartner" target="_blank">http://twitter.com/salespartner</a> PO Box 13085<br>
&gt; Johnsonville Wellington<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; NZ Borland Developers Group - Delphi mailing list<br>
&gt; Post: <a href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
&gt; Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
&gt; Unsubscribe: send an email to <a href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with<br>
&gt; Subject: unsubscribe<br>
&gt;<br>
</div>-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL:<br>
<a href="http://listserver.123.net.nz/pipermail/delphi/attachments/20140403/881f707a/
attachment-0001.html" target="_blank">http://listserver.123.net.nz/pipermail/delphi/attachments/20140403/881f707a/<br>
attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Delphi mailing list<br>
<a href="mailto:Delphi@listserver.123.net.nz">Delphi@listserver.123.net.nz</a><br>
<a href="http://listserver.123.net.nz/mailman/listinfo/delphi" target="_blank">http://listserver.123.net.nz/mailman/listinfo/delphi</a><br>
<br>
End of Delphi Digest, Vol 126, Issue 5<br>
**************************************<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe<br>
</div></div></blockquote></div><br></div>