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



47
48
49
# File 'lib/oci8/datetime.rb', line 47

def self.default_timezone
  @@default_timezone
end

.default_timezone=(tz) ⇒ Object



51
52
53
54
55
56
# File 'lib/oci8/datetime.rb', line 51

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