module Mongoid::Criteria::Queryable::Extensions::DateTime
This module contains additional datetime behavior.
Public Instance Methods
__evolve_time__()
click to toggle source
Evolve the date time into a mongo friendly UTC time.
@example Evolve the date time.
date_time.__evolve_time__
@return [ Time
] The converted time in UTC.
@since 1.0.0
# File lib/mongoid/criteria/queryable/extensions/date_time.rb, line 20 def __evolve_time__ usec = strftime("%6N").to_f u = utc ::Time.utc(u.year, u.month, u.day, u.hour, u.min, u.sec, usec) end