I'm trying to convert a timestamp string to Date in PHP. I have following code
date_default_timezone_set('Asia/Calcutta');
$time = (int)$_POST['timestamp'];
$timeString = date('H:i:s',$time);
Howevever, I always get timeString as 08:44:07 no matter what. I figured that timestamp is greater than what 32 bit integer could store, probably that's why this conversion always gives a default maximum value for integers.
How can I create a 64-bit integer in PHP? I have a 64-bit machine and 64-bit Windows 7 running on it. Is there a better way to convert timestamp string to local time?
EDIT: timestamp as a string is being sent by javascript - "1330582437883"
var_dump( $_POST['timestamp']);