Bugs: Browse | Submit New | Admin

[#28833] Problems returning dates with daylight savings time or not

Date:
2011-01-06 23:42
Priority:
3
Submitted By:
Jason Thomas (jmthomas)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Problems returning dates with daylight savings time or not

Detailed description
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

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item