Class: Sequel::SQLTime

Inherits:
Time show all
Defined in:
lib/sequel/sql.rb

Overview

Time subclass that gets literalized with only the time value, so it operates like a standard SQL time type.

Class Method Summary collapse

Class Method Details

.create(hour, minute, second, usec = 0) ⇒ Object

Create a new SQLTime instance given an hour, minute, and second.



45
46
47
48
# File 'lib/sequel/sql.rb', line 45

def self.create(hour, minute, second, usec = 0)
  t = now
  local(t.year, t.month, t.day, hour, minute, second, usec)
end