Code: Select all
$time = 'May 20 at 6:39 AM';
echo strtotime($time);
echo '<br />';
echo strtotime($time,time());Am I doing something wrong?
Moderator: General Moderators
Code: Select all
$time = 'May 20 at 6:39 AM';
echo strtotime($time);
echo '<br />';
echo strtotime($time,time());Perhaps a timezone issue. What does it say forscottayy wrote:Both of these give me a timestamp that is exactly two hours behind what it should be. The timestamp returned is at 4:39 AM.Code: Select all
$time = 'May 20 at 6:39 AM'; echo strtotime($time); echo '<br />'; echo strtotime($time,time());
Am I doing something wrong?
Code: Select all
strtotime("now");result of strtotime get in GMT formatscottayy wrote:Both of these give me a timestamp that is exactly two hours behind what it should be. The timestamp returned is at 4:39 AM.Code: Select all
$time = 'May 20 at 6:39 AM'; echo strtotime($time); echo '<br />'; echo strtotime($time,time());
Am I doing something wrong?