<tt><font size=2>Dario,</font></tt>
<br>
<br><tt><font size=2>I think ICU4C [</font></tt><a href="http://icu-project.org/"><tt><font size=2>http://icu-project.org/</font></tt></a><tt><font size=2>]
provides features which you need.</font></tt>
<br><tt><font size=2>I'd recommend you to check following ICU user guide
sections -</font></tt>
<br>
<br><a href="http://userguide.icu-project.org/formatparse/datetime"><tt><font size=2>http://userguide.icu-project.org/formatparse/datetime</font></tt></a>
<br><a href="http://userguide.icu-project.org/datetime/timezone"><tt><font size=2>http://userguide.icu-project.org/datetime/timezone</font></tt></a>
<br>
<br><tt><font size=2>-Yoshito</font></tt>
<br>
<br><tt><font size=2>&gt; -----Original Message-----<br>
&gt; From: Dario Teixeira [</font></tt><a href=mailto:darioteixeira@yahoo.com><tt><font size=2>mailto:darioteixeira@yahoo.com</font></tt></a><tt><font size=2>]
<br>
&gt; Sent: Wednesday, February 09, 2011 11:03<br>
&gt; To: tz@lecserver.nci.nih.gov<br>
&gt; Subject: C/C++ library that parses TZ data?<br>
&gt; <br>
&gt; Hi,<br>
&gt; <br>
&gt; I have a problem which is fairly common when one is running a web
application<br>
&gt; that wishes to display timestamps localised towards each user's time
zone.<br>
&gt; Basically, I need a function that takes as input a timestamp in UTC
and <br>
&gt; a time zone specified in the Zoneinfo convention (ex: &quot;Europe/Lisbon&quot;),<br>
&gt; and returns the localised version of that timestamp, including a time
zone<br>
&gt; abbreviation aware of daylight savings. &nbsp;Example:<br>
&gt; <br>
&gt; 2010-01-01 15:30, &quot;Europe/Lisbon&quot; &nbsp; &nbsp; &nbsp; -&gt;
2010-01-01 15:30 WET<br>
&gt; 2010-01-01 15:30, &quot;Europe/Paris&quot; &nbsp; &nbsp; &nbsp; &nbsp;-&gt;
2010-01-01 16:30 CET<br>
&gt; <br>
&gt; 2010-07-01 15:30, &quot;Europe/Lisbon&quot; &nbsp; &nbsp; &nbsp; -&gt;
2010-07-01 16:30 WEST<br>
&gt; 2010-07-01 15:30, &quot;Europe/Paris&quot; &nbsp; &nbsp; &nbsp; &nbsp;-&gt;
2010-07-01 17:30 CEST<br>
&gt; <br>
&gt; Since the zoneinfo data is present in every Unix system and glibc
includes<br>
&gt; routines for parsing it, interfacing with glibc seemed the obvious
solution.<br>
&gt; Unfortunately, glibc was not designed with this use case in mind.
&nbsp;In fact,<br>
&gt; the glibc interface to zoneinfo can be described as &quot;sui generis&quot;
if one<br>
&gt; is feeling charitable, or &quot;insane&quot; if truth must be told.
&nbsp;Specifically, to<br>
&gt; obtain the localised version of a given timestamp, one must first
set the 'TZ'<br>
&gt; environment variable with the target timezone, and then invoke 'localtime'.<br>
&gt; The abbreviated name of the timezone can be found in the global 'tzname'<br>
&gt; array: at position 'tzname[0]' if daylight savings are not in effect
and at<br>
&gt; position 'tzname[1]' if they are. &nbsp;A quick search through glibc's
bugzilla<br>
&gt; shows I'm not the only one to find this interface anachronistic [1],
but it<br>
&gt; also reveals that it is unlikely to change.<br>
&gt; <br>
&gt; So, my question is if someone is aware of some alternative library
in C <br>
&gt; or C++ that provides this same functionality, but is friendlier towards<br>
&gt; concurrent applications.<br>
&gt; <br>
&gt; Best regards,<br>
&gt; Dario Teixeira<br>
&gt; <br>
&gt; [1] </font></tt><a href="http://sources.redhat.com/bugzilla/show_bug.cgi?id=11620"><tt><font size=2>http://sources.redhat.com/bugzilla/show_bug.cgi?id=11620</font></tt></a><tt><font size=2><br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; &nbsp; &nbsp; &nbsp; <br>
&gt; <br>
&gt; <br>
</font></tt>