Module: OCI8::BindType::Util

Included in:
DateTime, LocalDateTime, LocalTime, Time, UTCDateTime, UTCTime, TDO
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
@@default_timezone =
:local

Class Method Summary collapse

Class Method Details

.default_timezoneObject



49
50
51
# File 'lib/oci8/datetime.rb', line 49

def self.default_timezone
  @@default_timezone
end

.default_timezone=(tz) ⇒ Object



53
54
55
56
57
58
# File 'lib/oci8/datetime.rb', line 53

def self.default_timezone=(tz)
  if tz != :local and tz != :utc
    raise ArgumentError, "expected :local or :utc but #{tz}"
  end
  @@default_timezone = tz
end