Jump to content

[SOLVED] strtotime() problem


hchsk

Recommended Posts

i must be making a small stupid error, but i'm stumped:

 

 

//$lasteventtime is a date/time in format identical to $mytime

//GET TIME NOW
$ltime = time() + 3*60*60 ;
$mytime = date('D, j M Y h:i:s',$ltime);

//CHECK DIFFERENCE
print $mytime . '<br>' . $lasteventtime . '<br>';
$inactive = strtotime($mytime) - strtotime($lasteventtime);

 

 

the dates i am testing this with are:

 

Sun, 3 May 2009 11:43:03
Sat, 2 May 2009 10:24:52

 

and it is returning:

 

91091

 

for 9 hours, 10 minutes and 91 seconds, clearly incorrect.

 

 

thank you for your time and any help.

Link to comment
https://forums.phpfreaks.com/topic/156665-solved-strtotime-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.