strtotime problem
Posted: Sat May 20, 2006 5:49 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?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
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?