The first attempt is in the IE 9 console:
new Date('2013-10-24T07:32:53') Thu Oct 24 07:32:53 UTC+0200 2013
returns as expected
The following attempt is in the FireFox 24 console:
new Date('2013-10-24T07:32:53') Date {Thu Oct 24 2013 07:32:53 GMT+0200 (Central Europe Standard Time)}
Then I go to the Chrome 30 console:
new Date('2013-10-24T07:32:53') Thu Oct 24 2013 09:32:53 GMT+0200 (Central Europe Daylight Time)
But time is 09 , it should be 07 .
Is this a bug in chrome or am I doing something wrong here?
I cannot use any other format than this "2013-10-24T07: 32: 53", which I get from JSON with C #. I need to get the hour of this timestamp, with getHours I get the insect value in Chrome.
Decision:
var inputHour = input.split('T')[1]; inputHour = inputHour.substring(0, 2);
javascript google-chrome time
Rumplin
source share