Module: Sequel::NamedTimezones

Included in:
Sequel
Defined in:
lib/sequel/extensions/named_timezones.rb

Defined Under Namespace

Modules: DatabaseMethods

Instance Attribute Summary (collapse)

Instance Attribute Details

- (Object) tzinfo_disambiguator

Handles TZInfo::AmbiguousTime exceptions automatically by providing a proc called with both the datetime value being converted as well as the array of TZInfo::TimezonePeriod results. Example:

Sequel.tzinfo_disambiguator = proc{|datetime, periods| periods.first}


57
58
59
# File 'lib/sequel/extensions/named_timezones.rb', line 57

def tzinfo_disambiguator
  @tzinfo_disambiguator
end