Hi list,

looks like moving to GMT+11 timezone gives you a nice sun in february but
also headache with oracle and timezones.
The application, the db and the users are in the same timezone (GMT+11), we
set this in the Application constructor with the NSTimeZone.setDefault,
TimeZone.setDefault, even -Duser.timezone=....
Now here's the problem :
- the user enters a date, for example *21/02/2012 23h59* which is stored in
Java as 21/02/2012 12h59 (GMT).
- the jdbc driver (ojdbc5.jar Oracle JDBC Driver version -
"11.1.0.7.0-Production") converts the date to 21/02/2012 23h59
- the db sets the column (of type DATE) : set my_date = '21/02/2012 23h59'
"UPDATE IP_DATES_OUVERTURE_DOM SET IP_DATES_FIN_DOM = ? WHERE (...)"
withBindings: 1:2012-02-21 23:59:00(ipDatesFinDom)
- the user request the same date
- the jdbc driver fetch the date as 21/02/2012 23h59 (no tz info at this
level)
- the adaptor creates a NSTimestamp with 21/02/2012 23h59 (GMT)
- the formatter (configured with tz = GMT+11) shows : *22/02/2012 10h59* ...

Something is obviously wrong with this setup, either :
- the jdbc driver should not convert to GMT+11 when inserting, the db then
stores only GMT dates
- the jdbc driver or the adaptor should convert back to GMT when reading
the date from the DB

Any hint is welcomed,

Thanks !

Alex
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to