<div>If /etc/localtime is a softlink, then it is trivial to determine what timezone it actually is. &nbsp;If it is not a softlink, then you can calculate checksums of all the installed zoneinfo files (/usr/share/zoneinfo/* ?) against the checksum of /etc/localtime. &nbsp;Assuming that /etc/localtime is actually one of the currently installed timezones, you should be able to determine precisely which one it is (along with any aliases for that timezone).</div>
<div><br></div><div>Simillarly, you can compare the checksum of /etc/localtime with the checksum of the equivalent timezone in the to-be-installed zoneinfo files to see if the current timezone has changed, and thus requires a restart of timezone-sensitive servers.</div>
<div><br></div><div>As a further refinement, you may want to consider keeping track of when timezones split (e.g. when&nbsp;<span class="Apple-style-span" style="font-family: -webkit-sans-serif; line-height: 19px; ">America/Argentina/Cordoba split off&nbsp;America/Argentina/Salta in 2008i) so that if a user is using a timezone so that split since they last upgraded, they can at least be warned that their local time may not be correct, and giving them a list of alternatives to choose from.</span></div>
<div><span class="Apple-style-span" style="font-family: -webkit-sans-serif; line-height: 19px;"><br></span></div><div><span class="Apple-style-span" style="font-family: -webkit-sans-serif; line-height: 19px;">-Scott</span></div>
<div><br><br><div class="gmail_quote">On Fri, Nov 7, 2008 at 8:10 AM, Edwin Groothuis <span dir="ltr">&lt;<a href="mailto:edwin@mavetju.org">edwin@mavetju.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="Ih2E3d">&nbsp;&lt;yoshito_umaoka &lt;at&gt; <a href="http://us.ibm.com" target="_blank">us.ibm.com</a>&gt; writes:<br>
<br>
&gt; &gt; I am working on an issue related to Brazil timezone. Our code reads<br>
&gt; &gt; the DST rules from windows registry instead of tzdata.<br>
&gt; &gt;<br>
&gt; &gt; My question is -- how do I determine whether the windows system has<br>
&gt; &gt; applied the latest timezone DST rules from the following registry? I<br>
&gt; &gt; don&#39;t know how to interpret the binary data<br>
&gt;<br>
&gt; To access time zone rules used by Windows, you can use the API below -<br>
<br>
</div>For &quot;freebsd-update&quot; (binary FreeBSD base system patch and migration) I have<br>
been asked if it was possible to determine of which timezone the current<br>
installed file in /etc/localtime was, so people could have non-interactive<br>
updates with regarding to that. The timezone given by date(1) doesn&#39;t always<br>
give a good enough hint, specially not for me in Australia where EST is often<br>
confused by programs with the US version of EST...<br>
<br>
Also, being able to compare the old /etc/localtime with the newly to be<br>
installed one gives a hint on whether or not this is an important one for this<br>
machine, i.e. if you have to restart long-running services (syslog, cron) which<br>
otherwise will not notice the DST change.<br>
<br>
Consider it a feature request :-)<br>
<font color="#888888"><br>
Edwin<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Scott Atwood<br><br>Cycle tracks will abound in Utopia. &nbsp;~H.G. Wells<br><br><br>
</div>