Created
September 27, 2010 09:17
-
-
Save gr2m/598793 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Preconditions: | |
* set your timezone to Auckland, New Zealand. | |
Description | |
There is a bug with the Date Object. »new Date("2010/9/26")« returns | |
»Sat Sep 25 2010 23:00:00 GMT+1200 (NZST)« | |
Expected result | |
»Sat Sep 26 2010 00:00:00 GMT+1200 (NZST)« | |
Reproduce in Console: | |
> new Date("2010/9/25") | |
=> Sat Sep 25 2010 00:00:00 GMT+1200 (NZST) | |
> new Date("2010/9/26") | |
=> Sat Sep 25 2010 23:00:00 GMT+1200 (NZST) | |
> new Date("2010/9/27") | |
=> Mon Sep 27 2010 00:00:00 GMT+1300 (NZDT) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment