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

Add Date.prototype.toISOString()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Done
    • Affects Version/s: 3.6.8
    • Fix Version/s: None
    • Component/s: Shell
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      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

      Description

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

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: