Closed
Bug 1155096
Opened 10 years ago
Closed 8 years ago
getDate() returns incorrect value for some dates in Moscow timezone on Linux
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dioslaska, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36
Steps to reproduce:
1. Open Firefox on a Linux Machine
2. Set the system timezone to Moscow
3. Write the following code in the console: new Date(1981, 2, 32).getDate()
Actual results:
It returns 31
Expected results:
It should return 1
It happens for specific years only, confirmed for 1981,1982,1983,1984.
For other timezones the returned value is correct
Updated•10 years ago
|
Component: Untriaged → JavaScript Engine
OS: Windows 8.1 → Linux
Product: Firefox → Core
Comment 1•8 years ago
|
||
Fixed in https://hg.mozilla.org/mozilla-central/rev/b7ef07909cc4
Before (Ubuntu):
new Date(1981, 2, 32).getDate()
31
new Date(1982, 2, 32).getDate()
31
new Date(1983, 2, 32).getDate()
31
new Date(1984, 2, 32).getDate()
31
After (Ubuntu):
new Date(1981, 2, 32).getDate()
1
new Date(1982, 2, 32).getDate()
1
new Date(1983, 2, 32).getDate()
1
new Date(1984, 2, 32).getDate()
1
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•