Whatever Gentoo is doing to build Joda-time, it is doing it wrong. If I 
run the tz compiler directly (on Windows, not that it matters):

    java org.joda.time.tz.ZoneInfoCompiler -src . southamerica

Exception in thread "main" java.lang.ArithmeticException: Adding time 
zone offset caused overflow
        at 
org.joda.time.chrono.ZonedChronology$ZonedDurationField.getOffsetToAdd(ZonedChronology.java:348)
        ...

If I run it again with the system property to force UTC only:

    java 
-Dorg.joda.time.DateTimeZone.Provider=org.joda.time.tz.UTCProvider 
org.joda.time.tz.ZoneInfoCompiler -src . southamerica

...it doesn't throw any exception.

The reason why the system property was required in the first place was 
as a bootstrap. The tz compiler uses Joda-time classes, which in turn 
expect a tz provider to exist. At some point a bug was introduced which 
required this property even if not doing a bootstrap compile. Fixing it 
was low priority because most users just use the prebuilt Joda-time. I 
just check in the fix such that the system property is no longer required.

Rodrigo Severo wrote:
> Hi,
>
>
> I was getting a "java.lang.ArithmeticException: Adding time zone 
> offset caused overflow" error when installing joda-time 1.6.0 on my 
> Gentoo machine.
>
> After several debugs I finally got to the conclusion that joda-time 
> isn't compatible with the "right" timezones, ie, compatible with 
> /usr/share/zoneinfo/America/Sao_Paulo but not with 
> /usr/share/zoneinfo/right/America/Sao_Paulo for example.
>
> Is this a bug or is it intended?
>
> I hope it's not intended as I'm a regular user of the right timezones ;)
>
> From tzcode Makefile:
>
> The regular (non-right) timezones are "seconds since the epoch (not 
> counting leap seconds)".
>
> The right timezones are "seconds since the epoch (counting leap seconds)".
>
>
> TIA,
>
> Rodrigo
>
>

------------------------------------------------------------------------------
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to