<div dir="ltr"><div>&gt; Let&#39;s take a concrete example: say my user has nominated &#39;Australasia&#39; and<br>
&gt; &#39;Hobart&#39;.  So I look in your Australasia file and do a (manual at this<br>
&gt; stage) search for &#39;Hobart&#39;, but find only one reference to it (other than in<br>&gt; comments).<br><br></div>If you allow the user to enter the City Name, please note that the user might enter &quot;Hovarta&quot;, which is the (made-up) localised version of the name of the city.  cf Kolkotta, Wien, etc<br><div><div><br></div><div>This issue turns up regularly on the list (along with &quot;But that is not the biggest city, including suburbs).  The TZ database does not deal with UI issues, in this respect, you will have to handle them.</div><div><br></div><div>Will your clock have a UI?  Accessible as a web page, or with up/down/select buttons?<br></div><div><br><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">-- <br>Sanjeev Gupta<br>+65 98551208     <a href="http://www.linkedin.com/in/ghane" target="_blank">http://www.linkedin.com/in/ghane</a></div></div>
<br><div class="gmail_quote">On Sat, Oct 14, 2017 at 8:45 PM, Daniel Ford <span dir="ltr">&lt;<a href="mailto:dfnojunk@gmail.com" target="_blank">dfnojunk@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I&#39;m looking to develop a &#39;world clock&#39; that could be sold to anyone (with<br>
Internet access via a Wi-Fi AP) anywhere in the world, that will display<br>
their local time, taking into account DST if/when applicable.<br>
<br>
Given that DST &#39;rules&#39; can change at the whim of governments, my firmware<br>
will need to annually look up &#39;current&#39; DST rules from the web.  After much<br>
searching, it seems that your TZ Database is the best supported such<br>
reference for time zone rules.  But I&#39;m having great difficulty working out<br>
how I might access its mine of information...<br>
<br>
(I&#39;ll understand if you don&#39;t have time to help out a beginner, and maybe<br>
then you could refer me to a help site for TZ database applications.)<br>
<br>
I&#39;m a hardware engineer with some programming experience, particularly<br>
assembler (various MCUs) and some C, but little or no experience in other<br>
languages.  I&#39;m developing this clock on an Arduino-like platform (NodeMCU,<br>
which has in-built Wi-Fi).  My development tools run on a Win7Pro64 PC.<br>
<br>
The tools that you kindly provide for your database appear to be geared<br>
primarily towards Linux/Unix platforms, and I have no idea how I might<br>
convert them for a NodeMCU!  I&#39;m looking for some &#39;simple&#39; way to access the<br>
desired TZ/DST information, preferably using simple string searches.<br>
<br>
For my application, all I&#39;m interested in are the *current* rules.  The<br>
wealth of history in your db is undoubtedly of interest to many, but for me<br>
is just &#39;clutter&#39; to be searched through.  But writing a program to find<br>
those rules for a particular locality has me stumped right now.  I can&#39;t<br>
expect my dumb users to know a letter code for their time-zone/DST-rules, so<br>
all I&#39;m expecting them to select from program-generated lists are: (1) their<br>
world region (Europe, Asia, Australasia, etc), and (2) the name of a major<br>
city in their time-zone with the same DST rules they follow.<br>
<br>
Let&#39;s take a concrete example: say my user has nominated &#39;Australasia&#39; and<br>
&#39;Hobart&#39;.  So I look in your Australasia file and do a (manual at this<br>
stage) search for &#39;Hobart&#39;, but find only one reference to it (other than in<br>
comments).  The jumble of numbers and letters there do not (clearly) tell me<br>
when DTS starts or ends.  So how could I possibly write some code to find<br>
out that required information??<br>
<br>
I&#39;ve looked through the TZ_database-2017b.tar file for some sort of &#39;how-to&#39;<br>
explanation of what all the file contents mean and how to programmatically<br>
search for a specific TZ, but have so far found nothing.<br>
<br>
Ideally, what I&#39;d like to see is a text-only table of just current TZ/DST<br>
rules for each region/locality (they could all fit into a single file with<br>
all the historical data and comments removed), perhaps in the clear form<br>
used by Jack Christensen in his excellent Arduino Timezone library examples,<br>
such as...<br>
<br>
// Australia Eastern Time Zone (Sydney, Melbourne, Hobart)<br>
TimeChangeRule aEDT = {&quot;AEDT&quot;, First, Sun, Oct, 2, 660};<br>
TimeChangeRule aEST = {&quot;AEST&quot;, First, Sun, Apr, 3, 600};<br>
TimezoneExt ausET(&quot;NSW, Vic, Tas&quot;, aEDT, aEST);<br>
// Australia Eastern Time Zone (Brisbane)<br>
TimezoneExt QldT(&quot;Queensland&quot;, aEST, aEST);  // no DST in Qld!<br>
<br>
... which clearly tells me in a program-searchable way that in the main<br>
eastern states DST starts on the first Sunday in October at 2am, becoming<br>
UTC offset +11 hours (660 minutes), and ends on the first Sunday in April at<br>
3am, reverting to UTC offset +10 hours.  Couldn&#39;t be simpler!<br>
<br>
Any help in using the TZ database will be much appreciated (and acknowledged<br>
in my source code).<br>
<br>
Regards,<br>
Daniel<br>
---------------<br>
Daniel Ford (Gerroa, Australia)<br>
&quot;My loathings are simple: stupidity, oppression, crime, cruelty, soft<br>
music.&quot; - Vladimir Nabokov<br>
<br>
</blockquote></div><br></div>