I used strtotime($datetime)
in PHP to convert textual datetime description into Unix timestamp (see code below).
$datetime = '2012-04-17 00:00:00';
$timestamp = strtotime($datetime);
However, the result of $timestamp
in Time zone (London) was 1334617200 and in Time zone (Beijing) it was 1334620800.
Can anyone explain me why this happened? Is the result of strtotime()
changed based on the timezone?
Thanks in advance!