Oracle & Time Zone
- From: <lukas@at-point.ch>
- To: dev@activerecord-jdbc.kenai.com
- Subject: Oracle & Time Zone
- Date: Fri, 17 Jun 2011 11:02:29 +0000 (GMT)
Hi
Are there **any** caveats when working with Oracle (11g, ojdbc6.jar)
and support for time zones?
Fact is, my Rails app has set `config.time_zone = 'Bern'` (+02:00),
furthermore `AR::Base.default_timezone` is set to `:utc` - so the rails
end is I guess correctly configured. The database on the other hand has
`SESSIONTIMEZONE` set to `+02:00`, so I suppose this is okay as well :)
The problem is either that a) time values are stored *without* the
timezone, or b) when loading they are not correctly converted back to
my time zone.
When checking the AREL logs it appears the times are stored like
`TIMESTAMP'2011-06-17 09:36:55'` (current time is 2011-06-17
11:36:55,512) - so the time 11:36:55 is converted to UTC (-2 hours) and
stored as `TIMESTAMP` - shouldn't it use `TIMESTAMP'2011-06-17 09:36:55
UTC'`, i.e. including the time zone?
Thanks for any advice, Lukas
|
Oracle & Time Zone |
lukas | 06/17/2011 |





