Hi,

 

I'm trying to resolve a perplexing problem related to the recent changes
made to Brazil's DST rules.  I've recompiled the latest Joda source
(1.5.2) with the latest tz database from twinsum.com
<http://www.twinsun.com/tz/tz-link.htm> .  Here's the code snippet that
is causing me problems.

 

   DateTimeZone dtz =
org.joda.time.DateTimeZone.forID("America/Sao_Paulo");

   DateTime dateTime = new DateTime(2008, 10, 19, 0, 0, 0, 0, dtz);

 

When running this code snippet on a WinXP host with an older version of
the database and Joda (1.3) I get the following Exception on the 2nd
line:

   java.lang.IllegalArgumentException: Illegal instant due to time zone
offset transition: 2008-10-19T02:00:00.000

        at
org.joda.time.chrono.ZonedChronology.localToUTC(ZonedChronology.java:143
)

        at
org.joda.time.chrono.ZonedChronology.getDateTimeMillis(ZonedChronology.j
ava:119)

 

When running this code snippet on WinXP with the new joda jar created
from the latest joda source and tz database everything works swimmingly.

 

So far so good.  But now the problem.  I need to run this same code on
Redhat Linux Enterprise 4 update 5.  When running this code with the
most recent joda/tz jar I created I get almost the same problem I get
when running with the older jar.  I say "almost" because the time
reported in the "Illegal instant" exception changes from
2008-10-19T02:00:00.000 to 2008-10-19T03:00:00.000, i.e., the reported
problem time moves from 2am to 3am.  I updated /usr/share/zoneinfo (and
/etc/localtime) with the new tz database, but that didn't change the
results.

 

Any ideas on what might explain this, and any suggested resolution(s),
would be greatly appreciated.


Thanks,
Rich

 

________________________________

Rich Youngkin / [EMAIL PROTECTED] / (303)538-5085

Confidentiality Notice: This email contains information from Avaya Inc
and is intended for the addressee only. This communication, and any
accompanying file attachments, may contain confidential or privileged
material and are subject to the confidentiality provisions of your
signed agreement with Avaya. If you are not the intended recipient, any
use, distribution, or disclosure of this communication is strictly
prohibited. Please contact the sender if you were sent this message in
error and destroy all copies of the original message.

 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to