This is really due to the oci8 gem because it's assuming any date you
pull from the DB should be formatted with the timezone you are
currently in. Thus if you pull a date from August (and it's now
January) it will format it without DST. I opened an issue with them
but I fixed it by hacking the datetime.rb file in ruby-oci8 in the
ocitimestamp_to_time method to not apply a timezone offset. Hopefully
this might help someone else.

Jason

On Jan 6, 10:08 am, Jeremy Evans <[email protected]> wrote:
> On Jan 6, 8:39 am, Jason Thomas <[email protected]> wrote:
>
> > > If you connect to
> > > Oracle via the jdbc adapter, you should have better luck.
>
> > Doesn't this require JRuby? I'm not going to be able to use that.
>
> It does.  It's unfortunate, as the jdbc adapter is probably better
> supported than the oracle adapter.
>
> > > I'd
> > > certainly consider a patch to the oracle adapter to add type
> > > conversion, but as I don't have access to an Oracle database, I can't
> > > really develop one myself.
>
> > I'd be glad to work on it. I found the oracle adapter but aren't sure
> > where to start. Do I need something like TYPE_TRANSLATOR like the
> > mysql and postgres adapters?
>
> Something like that.  It's more involved as the oci8 driver does some
> type translation itself.
>
> > I must be missing something because it seems like an easy patch since
> > you already have all the conversion methods defined.
>
> It shouldn't be too difficult if you follow the other adapters.
> However, you should probably do what the jdbc adapter does and have an
> option to disable type conversion for performance reasons.
>
> Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to