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

Add Date.prototype.toISOString()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • 3.6.8
    • None
    • 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

    Description

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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: