Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 586589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:07:23+00:00 2026-05-13T15:07:23+00:00

My entities currently contain java Date properties. I’m starting to use Joda Time for

  • 0

My entities currently contain java Date properties. I’m starting to use Joda Time for date manipulation and calculations quite frequently. This means that I’m constantly having to convert my Dates into Joda DateTime objects and back again.

So I was wondering, is there any reason I shouldn’t just change my entities to store Joda DateTime objects instead of Java Date objects?

Please note that these entities are persisted via Hibernate. I found the jodatime-hibernate project, but I also was reading on the Joda mailing list that it wasn’t compatible with newer versions of hibernate. And it seems like it isn’t very well maintained.

So I’m wondering if it would be best to just continue converting between Date and DateTime, or if it would be wise to start persisting DateTime objects. My concern is being reliant on a poorly maintained library.

Edit: Note that one of my objectives is to be better able to store timezone information. Storing just a Date appears to save the date in the local timezone. As my application can be used globally, I need to know the timezone as well. Joda Time Hibernate seems to address this as well in the user guide.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:07:23+00:00Added an answer on May 13, 2026 at 3:07 pm

    I think using the Joda DateTime as your bean property type is probably a good idea. You can then have Hibernate do the conversion and save the property as the native database date format.

    I have personally used jodatime-hibernate and have not had a problem with it (we’re using Hibernate 3.2.5GA).

    If you have concerns about jodatime-hibernate, you can always use Hibernate’s custom type mapping mechanism (which I’m sure is all jodatime-hibernate does).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 315k
  • Answers 315k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer SELECT COUNT(date) , TRUNC(DATE,'MON') FROM TABLE GROUP BY TRUNC(DATE,'MON') HAVING… May 13, 2026 at 11:14 pm
  • Editorial Team
    Editorial Team added an answer Try this on for size: String properCase (String inputVal) {… May 13, 2026 at 11:14 pm
  • Editorial Team
    Editorial Team added an answer You can simply use the java.util.zip.* classes to unzip the… May 13, 2026 at 11:14 pm

Related Questions

I am writing in request of some suggestions for some well-designed open source Java
I think I sorted out my GridView1_PageIndexChanged event and thinking it should work protected
I think I am very close to assembling an MVC repository correctly but just
I've got a repository using LINQ for modelling the data that has a whole
I am currently scraping some data from the internet and converting into xml documents.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.