[SERVER-2072] Mongo shell prints Date objects with incorrect timezone Created: 08/Nov/10  Updated: 12/Jul/16  Resolved: 08/Nov/10

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 1.6.3
Fix Version/s: 1.7.2

Type: Bug Priority: Minor - P4
Reporter: Roy Smith Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

roy@santogold:~$ uname -a
Linux santogold 2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 19:52:42 UTC 2010 x86_64 GNU/Linux

roy@santogold:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04.1 LTS"


Operating System: Linux
Participants:

 Description   

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/



 Comments   
Comment by Eliot Horowitz (Inactive) [ 08/Nov/10 ]

spider monkey

Comment by Roy Smith [ 08/Nov/10 ]

Thanks. What's "SM"?

Comment by Eliot Horowitz (Inactive) [ 08/Nov/10 ]

we fixed this in 1.7.2
this is really a SM problem - but we changed the display of dates so there is no confusion

Generated at Thu Feb 08 02:58:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.