<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"><<a href="mailto:rchan@compuspec.com" target="_blank">rchan@compuspec.com</a>></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 'help' 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>
"Re: Contents of Delphi digest..."<br>
<br>
<br>
Today'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 <<a href="mailto:robo555@gmail.com">robo555@gmail.com</a>><br>
Subject: Re: [DUG] Daylight savings<br>
To: NZ Borland Developers Group - Delphi List<br>
<<a href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a>><br>
Message-ID:<br>
<CAJLpVUM1Kd98B0xTyTRF-R8atWtqK2usPaypKX6xprkSh=<a href="mailto:Pqyg@mail.gmail.com">Pqyg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<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's source code.<br>
<br>
Robo<br>
<br>
<br>
On Thu, Apr 3, 2014 at 12:30 AM, Alister Christie <<br>
<a href="mailto:alister@salespartner.co.nz">alister@salespartner.co.nz</a>> wrote:<br>
<br>
> I've noticed in Delphi XE that TTimeZone.Local.ToUniversalTime is a<br>
> week out on daylight savings, it works correctly in XE5 however (and<br>
> probably earlier versions).<br>
><br>
> program Project6;<br>
><br>
> {$APPTYPE CONSOLE}<br>
><br>
> uses<br>
> SysUtils,<br>
> DateUtils;<br>
><br>
> begin<br>
> Writeln(DateTimeToStr(TTimeZone.Local.ToUniversalTime(StrToDateTime(<br>
> '5/4/2014 2pm'))));<br>
> Writeln(DateTimeToStr(TTimeZone.Local.ToUniversalTime(StrToDateTime(<br>
> '12/4/2014 2pm'))));<br>
> Readln;<br>
> end.<br>
><br>
><br>
> Outputs<br>
><br>
> 5/04/2014 1:00:00 a.m.<br>
> 6/04/2014 1:00:00 a.m.<br>
><br>
> in XE (incorrectly) and<br>
><br>
> 5/04/2014 1:00:00 a.m.<br>
> 6/04/2014 2:00:00 a.m.<br>
><br>
> in XE5 (correctly). XE works correctly from the 13th onwards - so<br>
> it's just a problem for a week.<br>
><br>
> Does anyone have some code that does conversions to UTC correctly for<br>
> Delphi XE?<br>
><br>
> Alister Christie<br>
> Computers for People<br>
</div></div>> 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="">> us on Twitter <a href="http://twitter.com/salespartner" target="_blank">http://twitter.com/salespartner</a> PO Box 13085<br>
> Johnsonville Wellington<br>
><br>
><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<br>
> Subject: unsubscribe<br>
><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>