What steps will reproduce the problem?
1. Set the computer date to 2013-10-20 and Time Zone to "Brasilia Summer Time"
(City: São Paulo - Brazil)
2. When creating a Date instance, the browser's console should output something
like:
> new Date
Sun Oct 20 2013 19:50:18 GMT-0200 (BRST)
3. With Closure Library loaded, create a new instance of goog.date.Date:
> date = new goog.date.Date()
> date.getDate()
19
What is the expected output? What do you see instead?
date.getDate() should return 20. Instead 19 is returned.
What version of the product are you using? On what operating system?
Chrome, OS X.
Please provide any additional information below.
Internally, goog.date.Date calls setHours(0) on the internal Date object. Since
there is no hour 0 on Oct 20 for this timezone, the day goes back to 19.
Original issue reported on code.google.com by alo.and on 21 Oct 2013 at 10:01
Original issue reported on code.google.com by
alo.and
on 21 Oct 2013 at 10:01