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

Calling Date() with a date string as an argument returns the current time instead of converting the string

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 1.6.3
    • Shell
    • None
    • Linux santogold 2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 19:52:42 UTC 2010 x86_64 GNU/Linux
    • Linux

    Description

      In the shell, doing, calling Date() gets you the current date, regardless of what argument you give it. Calling "new Date()" gets you the argument string converted:

      > Date("November 15, 2010 10:00:00 UTC")
      Mon Nov 08 2010 10:42:17 GMT-0500 (EST)

      > new Date("November 15, 2010 10:00:00 UTC")
      "Mon Nov 15 2010 05:00:00 GMT-0500 (EST)"

      This is, at best, unexpected.

      Attachments

        Activity

          People

            Unassigned Unassigned
            roysmith Roy Smith
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: