Hi All,

I am seeing adjustments to Joda LocalTime and LocalDateTime objects 
where I'm not expecting them and wanted to do a reality check about my 
expectations.

I'm using the LocalTime and LocalDateTime classes for all dates and times 
throughout my project (built using AppFuse 2.0 + Hibernate 3 + Struts 2 and 
running on Postgresql 8).  I'm using Joda-Time version 1.5 and joda-time-
hibernate version 1.0.

As my application only ever runs in one timezone, I have no need for 
timezone-related adjustments.  In electing to use LocalTime and 
LocalDateTime objects, I was expecting that when I set a time, it would stay 
at that time.  For example, if I set a time to, say "14:00" in my java code, 
then persisted that to the DB, then retrieved it again, I expected to look in 
the DB (using PgAdmin) and see "14:00" there, and when I retrieve that 
value in my code via joda-time-hibernate I expect to get a LocalTime value 
equivalent to "14:00".

However, I'm not seeing that.  My joda-time object values are fine within my 
app, but they seem to have TZ adjustments made when they're persisted 
to/retrieved from the DB.

For the record, the time columns in the DB have all been created as 
Postgresql's "time without time zone" datatype.  If I use a 3rd party app 
(pgAdmin III) to insert a record into the DB with a time value of "14:00" when 
I view the data in that 3rd party app, I see "14:00".  However, when I retrieve 
that value again in my app, I get a LocalTime object representing the time 
"05:00" which seems to me to be the UTC value as we are UTC + 9 here 
ATM.

I suspect I'm totally misunderstanding something here and would appreciate 
being set straight!

Cheers,
Rob Hills
Waikiki, Western Australia
Mobile +61 (412) 904-357
Fax: +61 (8) 9529-2137


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to