Method: Sequel::SQLTime.parse

Defined in:
lib/sequel/sql.rb

.parseObject

Set the correct date and timezone when parsing times.



37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/sequel/sql.rb', line 37

def parse(*)
  t = super

  utc = Sequel.application_timezone == :utc
  d = @date
  if d || utc
    meth = utc ? :utc : :local
    d ||= t
    t = public_send(meth, d.year, d.month, d.day, t.hour, t.min, t.sec, t.usec)
  end

  t
end