When I request a date from the DB, oci8 returns it with my current timezone formatting. Since I'm in MST (Mountain Standard
Time) -07, I get a Time class with that timezone. The problem occurs when requesting a date during daylight savings
time. If I want OCI8 to return a time from August (for example), it applies my current timezone (MST -07), even though
the time is a MDT (Mountain Daylight Time).
I hacked datetime.rb at line 194 from this:
return ::Time.new(year, month, day, hour, minute, sec, utc_offset)
to this:
return ::Time.new(year, month, day, hour, minute, sec)#, utc_offset)
Now the Time class is parsing the raw time and not applying any utc_offsets based on the current timezone.
Perhaps an option could be added to the API at some level to do both: apply current timezone or return without
modification.
Jason |