tags:

views:

67

answers:

2

I read (dont't know where anymore, but see here) when using Jodatime you have to keep files up to date. What kind of files? Why is that?

+1  A: 

You will need to use the latest jar in most time, i.e. updating the jar should suffice.

The related discussion is regarding is about Joda inclusion of configuration files for the different calendars. Joda stores information about the calendars, their daylight saving status, etc in files that are included in the jar. Overtime, governments decide to change such rules. In such cases, these included configuration files need to be updated.

Basically, by including an old copy of the jodatime jar, you run the risk of having discrepancies in your time analysis.

notnoop
+1 for the info, but couldn't accept it since the leap seconds does not seem to be correct (http://joda-time.sourceforge.net/faq.html#leapseconds)
Peter
@Peter thanks for the correction. I thought they did!
notnoop
+1  A: 

Joda-Time contains the time zone data from the standard source. As governments change their time zone rules, the data is updated. The Joda-Time jar file can be updated with the latest data using this process. It is recommended to keep the time zone data of the JDK and the time zone data of Joda-Time in line if possible.

However, if your application only uses a single time zone, or a stable time zone, then there is no need to keep up to date with the latest information, and the jar would not need to be updated.

BTW, there is no configuration for calendar systems or leap seconds. There is only configuration for time zones.

JodaStephen