On Mon, Mar 2, 2009 at 7:39 PM, Adam Vartanian <flo...@google.com> wrote:
>> I'm having trouble coming up with a good approach to take here. The
>> main issue is daylight savings time. It's fairly trivial for me to
>> write a Java program that builds a list of timezone ID's and their
>> associated GMT offsets, and using that list to give the C++
>> application the info it needs for the conversion, but I have not been
>> able to come up with a good way to support daylight savings time (and
>> also to support the dst-adjusted display names of timezones, e.g.
>> "EST" vs "EDT" for EST5EDT) in the C++ application short of
>> reimplementing all of the logic for every timezone ID by hand -- which
>> is less than ideal.
>>
>> I realize this may be slightly off topic, but it is related to Joda.
>> Apologies if this is the wrong place to ask... but I have not been
>> able to come up with any solutions. Has anybody here ever done
>> anything like this, or does anybody have any ideas about a good way to
>> add Joda timezone ID support to non-Java applications? Ideally I'd
>> like to support most of the Joda timezone IDs (both generic IDs like
>> "EST5EDT" and city IDs like "America/New_York"), but I would be
>> willing to limit the Java application to a representative subset of
>> the IDs if that makes it easier to deal with on the C++ side of
>> things. Any suggestions would be greatly appreciated.
>
> The timezone IDs aren't actually Joda-specific, they're ids from the
> public domain tz database.  See http://www.twinsun.com/tz/tz-link.htm.
>  They also provide a C library for accessing the timezone data, and
> the same database backs most standard time implementations (such as
> GNU libc's).  As long as you use the same version of the data file in
> both Joda-Time and whatever other library you choose, they should work
> fine together.  (Not using the same version just opens you up to
> displaying the same instant differently in the different programs
> since the definition of daylight savings time may have changed for
> some geographies in between the versions, of course.)

Are you sure this is where Joda gets it's timezone IDs from? C++'s
boost also claims to use the same database, but Joda provides a large
number of IDs that are not available in boost.

Unfortunately, I can not check the actual tz database to compare it to
Joda/boost. On that twinsun.com link, their mailing list seems to not
work, their FTP site is down, and the HTTP mirror listed has nothing
on it related to timezone databases. Very annoying!

Anyways that means I can't tell if Joda added extra IDs from somewhere
else, or if boost is missing them. In particular, all of the IDs
without /'s are missing from boost (e.g. "EST5EDT", "UTC", "Poland"),
as well as all IDs starting with "Brazil/", "Canada/", "Mexico/",
"Chile/", "Etc/", and "US/", and a few others. Did Joda add these from
some other database? Or is boost missing them?

Thanks,
Jason

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to