Re: [Joda-interest] Dealing with separate time and timezone DB fields

2010-05-06 Thread Stephen Cresswell
Nothing you can do with: DateTimeZone dtz = DateTimeZone.forID("America/New_York") dateTime = dateTime.withZone(dtz) ? On 6 May 2010 04:50, Adam Gordon wrote: > Long story short, due to a REALLY poor design by a subcontractor, our time > and time zone data are stored in separate fields in our

Re: [Joda-interest] Dealing with separate time and timezone DB fields

2010-05-06 Thread Sean Mitchell
On Thu, May 6, 2010 at 11:28 AM, Adam Gordon wrote: Unfortunately, we need the time zone - either implicitly or explicitly - as > it's required in a bunch of different areas. > If you need to know what the timezone is, then perhaps your subcontractor got it right. I'm guessing that you need to fo

Re: [Joda-interest] Dealing with separate time and timezone DB fields

2010-05-06 Thread Adam Gordon
Unfortunately, we need the time zone - either implicitly or explicitly - as it's required in a bunch of different areas. We dug deeper into the PersistentDateTimeTZ class and found that there's a method nullSafeSet and it appears that even though the data type in postgres is timestamp without time

Re: [Joda-interest] Dealing with separate time and timezone DB fields

2010-05-06 Thread Sean Mitchell
Hi Adam... I think you need to shed the dependency in the code on the timezone; you shouldn't need it. The Date object that Hibernate will get from JDBC should represent a moment in time, not a localized interpretation. Timezone only matters when you stick the date into the DB as a String, and whe