I ran into a strange issue. I am sending a date that I converted to milliseconds using Javascript to my controller. There, I convert the milliseconds to a time stamp in PHP. It seems to get the date part of it right, but the time is totally off. Can anyone please tell me what am I missing? The code is below.
javascript
var d = new Date("13 October 2014 11:13:00");
document.write(d.getTime() + " milliseconds since 1970/01/01");
result
1413191580000
php
echo date("Y-m-d H:i:s", 1413191580000/1000);
result
2014-10-13 02:13:00