Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-2795

Fix broken milliseconds precision

    • Type: Icon: Task Task
    • Resolution: Done
    • 3.0.22
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Hi! issue MONGOID-2741 has returned
      It was back in release v3.0.21, after being fixed in v3.0.20.
      (The Float decimal inaccuracy problem.)

      Commit where it broke again: c25e1fe7b80f558b50dd4f8e3fe6fe6785e74395

      This time I tried to fix it myself. The problem was that Time does not respond to sec_fraction (Date does). Instead it uses the method subsec for that purpose.

      I added the case and specs. The specs don't cover the 100% (because you can't check every number in existence), but it's better than nothing.

            Assignee:
            durran Durran Jordan
            Reporter:
            tombruijn tombruijn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: