Module: OCI8::BindType::Util
- Included in:
- DateTimeViaOCIDate, DateTimeViaOCITimestamp, TimeViaOCIDate, TimeViaOCITimestamp
- Defined in:
- lib/oci8/datetime.rb
Overview
:nodoc:
Constant Summary collapse
- @@datetime_fsec_base =
(1 / ::DateTime.parse('0001-01-01 00:00:00.000000001').sec_fraction).to_i
- @@time_offset =
::Time.now.utc_offset
- @@datetime_offset =
::DateTime.now.offset
- @@default_timezone =
:local
Class Method Summary collapse
- .default_timezone ⇒ Object
-
.default_timezone=(tz) ⇒ Object
Determines default timezone of Time and DateTime retrived from Oracle.
Class Method Details
.default_timezone ⇒ Object
14 15 16 |
# File 'lib/oci8/datetime.rb', line 14 def self.default_timezone @@default_timezone end |
.default_timezone=(tz) ⇒ Object
Determines default timezone of Time and DateTime retrived from Oracle. This accepts :local or :utc. The default is :local.
This parameter is used when both or either of Oracle server and client version is Oracle 8i or lower. If both versions are Oracle 9i or upper, the default timezone is determined by the session timezone.
24 25 26 27 28 29 |
# File 'lib/oci8/datetime.rb', line 24 def self.default_timezone=(tz) if tz != :local and tz != :utc raise ArgumentError, "expected :local or :utc but #{tz}" end @@default_timezone = tz end |