thompsma Posted September 18, 2007 Share Posted September 18, 2007 I am having a difficult time getting the proper 'date/time' format for the imap_search() function. I need to search for messages that have arrive in the last 40 minutes. This code DOESN'T work: //setting date/time variables date_default_timezone_set("America/Los_Angeles"); //setting default timezone $default_tz = date_default_timezone_get(); $current_date = date("D, j M Y H:i:s"); //current datetime $my_strtotime = "-40 minutes"; $past_date = date("D, j M Y H:i:s",strtotime($my_strtotime)); //datetime in past //some php code imap_search($mbox,"SINCE \"$past_date\""); //some more php code I have messages in the mailbox that have arrived in the last 40 minutes, but it is still coming up as false. I was reading that the date/time format is critical, but cannot find what the format should be. Link to comment https://forums.phpfreaks.com/topic/69768-imap_search-date-format/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.