I’m currently running into trouble when dealing with timestamps. I am debugging the following, exactly same code in Chrome 24.0.1312.56 m and Firefox 18.0.1 console:
new Date(parseInt('2012'), parseInt('09') - 1, parseInt('30')).getTime()/1000
When I execute it in Chrome I get:
1348956000
And when I execute it in Firefox I get:
1325199600
Question: What is the problem here?
For
parseInt('09'):Quote from
parseIntdocumentation:Solution: revise your code and explicitly specify the radix parameter: