class ActiveRecord::ConnectionAdapters::SQLServer::CoreExt::Time

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

Public Class Methods

_at_with_sql_type(value, type) click to toggle source
# 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