Details
-
Task
-
Status: Backlog
-
Unknown
-
Resolution: Unresolved
-
None
-
None
Description
In bson-ruby gem there is a method _bson_to_i defined for Time class from stdlib, but it is not defined for ActiveSupport::TimeWithZone class. Therefore, when one call this method on an instance of TimeWithZone, the call would go through ActiveSupport::TimeWithZone#wrap_with_time_zone, retaining the time zone.
We temporarily added definition of this method to Mongoid, as a palliative until bson is fixed. When this ticket is done, we should remove the workaround.