Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-930

Timestamp() argument order is reversed from legacy shell

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 1.0.4
    • Affects Version/s: None
    • Component/s: Bson
    • None
    • 3
    • Needed
    • Hide

      The mongosh Timestamp constructor now:

      • Takes argument in Timestamp(t, i) order, not Timestamp(i, t) (i.e. it is compatible with the legacy shell now in this regard)
      • Takes a Timestamp( { t: number, i: number }

        ) signature, which is preferred and is also used for formatting timestamps.

      Show
      The mongosh Timestamp constructor now: Takes argument in Timestamp(t, i) order, not Timestamp(i, t) (i.e. it is compatible with the legacy shell now in this regard) Takes a Timestamp( { t: number, i: number } ) signature, which is preferred and is also used for formatting timestamps.
    • Iteration Hamburg

      In the legacy shell, `Timestamp(t, i)` creates the same thing as `Timestamp(i, t)` in mongosh. mongosh inherits the driver’s order of arguments here.

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: