Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-37351

Add Date.prototype.toISOString()

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.6.8
    • Component/s: Shell
    • None
    • ALL
    • Hide

      start mongo shell and try to execute following commands:

      u64vm(mongod-3.6.8) test> var d = Date()
      u64vm(mongod-3.6.8) test> d
      Thu Sep 27 2018 18:37:13 GMT+0300 (EEST)
      u64vm(mongod-3.6.8) test> d.toString()
      Thu Sep 27 2018 18:37:13 GMT+0300 (EEST)
      u64vm(mongod-3.6.8) test> d.toISOString()
      2018-09-27T18:37:29.057+0300 E QUERY [thread1] TypeError: d.toISOString is not a function :
      @(shell):1:1
      Show
      start mongo shell and try to execute following commands: u64vm(mongod-3.6.8) test> var d = Date() u64vm(mongod-3.6.8) test> d Thu Sep 27 2018 18:37:13 GMT+0300 (EEST) u64vm(mongod-3.6.8) test> d.toString() Thu Sep 27 2018 18:37:13 GMT+0300 (EEST) u64vm(mongod-3.6.8) test> d.toISOString() 2018-09-27T18:37:29.057+0300 E QUERY [thread1] TypeError: d.toISOString is not a function : @(shell):1:1

      JavaScript in the mongo shell does not support toISOString() method on the Date object

            Assignee:
            nick.brewer Nick Brewer
            Reporter:
            igorsol Igor Solodovnikov
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: