English 中文(简体)
Jodatime : what is there to keep up to date?
原标题:
  • 时间:2009-11-10 13:54:20
  •  标签:
  • jodatime

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?

最佳回答

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.

问题回答

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.





相关问题
Jodatime - Custom Chronology

I would like to calculate a duration whereas 1 day will consist of 8 hours. Is creating a new Chronology is the right approach ? I did try to create a custom Chronology and override the assemble ...

Can I parse relative times with JodaTime?

I d love to be able to parse relative strings like now and yesterday and get JodaTime DateTimes. Is it possible? DateTimeFormat.forPattern and doesn t seem to support English relative times and I don ...

How to query a date in HQL (Hibernate) with Joda Time?

I am sure that someone familiar with HQL (I am myself a newbie) can easily answer this question. In my Grails application, I have the following domain class. class Book { org.joda.time.DateTime ...

Joda Time gives wrong time zone

I m using the Joda time (1.6) libraries and it keeps returning DateTime objects with the wrong time zone, British Summer Time instead of GMT. My Windows workstation (running JDK 1.6.0_16) thinks it s ...

Jodatime : what is there to keep up to date?

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?

热门标签