Class: ActiveRecord::ConnectionAdapters::SQLServer::CoreExt::Time
- Inherits:
-
Time
- Object
- Time
- ActiveRecord::ConnectionAdapters::SQLServer::CoreExt::Time
- Includes:
- DataCompat
- Defined in:
- lib/active_record/connection_adapters/sqlserver/core_ext/date_time.rb
Overview
Create our own Time class so that we can format strings properly and still have a Time class for the jdbc driver to work with
Instance Attribute Summary
Attributes included from DataCompat
Class Method Summary collapse
Methods included from DataCompat
Class Method Details
._at_with_sql_type(value, type) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/active_record/connection_adapters/sqlserver/core_ext/date_time.rb', line 41 def self._at_with_sql_type(value, type) new( value.year, value.month, value.day, value.hour, value.min, value.sec + (Rational(value.nsec, 1000) / 1000000), value.gmt_offset ).tap { |t| t._sql_type = type } end |