[SERVER-2073] Calling Date() with a date string as an argument returns the current time instead of converting the string Created: 08/Nov/10 Updated: 08/Nov/10 Resolved: 08/Nov/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 1.6.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Roy Smith | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux santogold 2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 19:52:42 UTC 2010 x86_64 GNU/Linux |
||
| Operating System: | Linux |
| Participants: |
| 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") > new Date("November 15, 2010 10:00:00 UTC") This is, at best, unexpected. |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 08/Nov/10 ] |
|
This is part of the javascript spec, so we can't change it. |