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

Mongo shell prints Date objects with incorrect timezone

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.7.2
    • Affects Version/s: 1.6.3
    • Component/s: Shell
    • None
    • Environment:
    • Linux

      If you print a Date in the shell, the stored value is correctly converted to system local time, and correctly annotated with a GMT offset, but is incorrectly labeled with the name of the local timezone. In the example below, the first date (November 1) is printed correctly, but the second date, while showing the correct GMT-0500 offset, is mis-labeled "EST". It should be "EDT".

      roy@santogold:~$ mongo
      MongoDB shell version: 1.6.3
      connecting to: test

      > new Date("November 1, 2010 10:00:00")
      "Mon Nov 01 2010 10:00:00 GMT-0400 (EST)"

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

      See also http://groups.google.com/group/mongodb-user/browse_thread/thread/3e87431a758cd3d4/

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

              Created:
              Updated:
              Resolved: