java.util.date

Java - How to set timezone of a java.util.Date

I have parsed a java.util.Date from a String but it is setting the local timezone as the timzone of the date object. The timezone is not specified in the String from which Date is parsed. I want to set a specific timezone of the date object. How can I do that? ...

GAE Datastore Java data type for date/time values

Both java.sql.Date and java.util.Date return the following when trying to persist them in the datastore. javax.jdo.JDOUserException: Attempt to handle persistence for object using datastore-identity yet StoreManager for this datastore doesn't support that identity type What data types do you use for date/time values? ...

Google App Engine, JDO, use Date in filter

Hi. In my application, I would like to fetch a set of entities from the Datastore, that have a Date field set to a date before the present moment. I do realize, that one of the ways of doing that is by simply storing the date in those entities as just a long value in milliseconds. But ist there actually a way of storing them as Dates...

How would you represent date of birthday in your java model?

And wait, don't rush to answer "java.util.Date", consider the following scenario. Person object having 2 fields: "birthday" and "nextMeeting" both java.util.Date. Now birthday stored in database as date type column (no time) for eg. 01-10-1979, and nextMeeting as datetime type for ex. 01-10-2010 20:00:00. You pull it from db, "birthday...