Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-2846

Add _bson_to_i method to ActiveSupport::TimeWithZone class.

    XMLWordPrintable

Details

    • Task
    • Status: Backlog
    • Unknown
    • Resolution: Unresolved
    • None
    • bson-5.0.0
    • BSON
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dmitry.rybakov@mongodb.com Dmitry Rybakov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: