Re: [PHP] strtotime returns 00:00 for 7am

2007-06-21 Thread Greg Donald
On 6/20/07, Phil Princely [EMAIL PROTECTED] wrote: using this code: function test_time($time_string) { echo strftime(%X %A, %b %e\n, strtotime($time_string)); You should be testing the strtotime() call's return value, it returns false on failure. if (($timestamp = strtotime($str)) ===

[PHP] strtotime returns 00:00 for 7am

2007-06-20 Thread Phil Princely
Hi all I'm new to this list. I hope this hasn't been discussed already. using this code: function test_time($time_string) { echo strftime(%X %A, %b %e\n, strtotime($time_string)); } test_time('now'); test_time('4pm + 2 Hours'); test_time('now + 2 fortnights'); test_time('last Monday');