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: Closed
    • Unknown
    • Resolution: Fixed
    • None
    • bson-5.0.0
    • BSON
    • None
    • Fully Compatible

    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

        Issue Links

          Activity

            People

              neil.shweky@mongodb.com Neil Shweky
              dmitry.rybakov@mongodb.com Dmitry Rybakov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: