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

Add _bson_to_i method to ActiveSupport::TimeWithZone class.

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • bson-5.0.0
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • Fully Compatible

      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.

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

              Created:
              Updated:
              Resolved: