Are there any cons to using Joda-Time?

后端 未结 7 1721
我在风中等你
我在风中等你 2020-12-02 13:12

I want to convince the architecture manager to include the Joda-Time jar in our product.

Do you know any disadvantages in using it?

I think Joda-Time needs t

相关标签:
7条回答
  • 2020-12-02 13:45

    The main issue with it is vendor lockin at least until it becomes part of the standard.

    For the most part I would use longs to store any business date information on a database. This gives me the flexibility to adjust the precision as I see fit. In most cases I just convert them to java.util.Date.

    Time zones I would treat to be a presentation level issue than a data issue. This simplifies the database and increases portability since databases can represent temporals in different fashions.

    The standard Calendar class provides me with some date manipulation functions which I convert to millisecond since epoch data.

    As for nanosecond precision I would store that as an offset from 0 as a separate long column.

    0 讨论(0)
提交回复
热议问题