Class: ADT::ColumnType::DateTime
Instance Method Summary collapse
Instance Method Details
#flag ⇒ Object
95 96 97 |
# File 'lib/adt/column_type.rb', line 95 def flag '?' end |
#type_cast(value, _table) ⇒ Object
89 90 91 92 93 |
# File 'lib/adt/column_type.rb', line 89 def type_cast(value, _table) val = value.unpack('L L') date = ::Date.jd(val.dig(0)) ::Time.at(date.to_time + val.dig(1) / 1000).to_datetime end |