All pastes #556481 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-06-10 16:34 UTC
rendered paste body
<?php
/**
  * in this case (cause the date given not say the timezone .it always use it as the local time zone 
  * so always the now will be greater than $date 
  * unless you are already before $monthday in your local time zone 
  */

$monthday = "2007-06-10T11:00:00";
$monthdayyear = explode("-",gmdate($monthday),10);
$monthdayyear['day'] = explode("T",$monthdayyear[2]);
$time = explode(":", $monthdayyear["day"][1]);
$date = gmmktime($time[0], $time[1], $time[2], $monthdayyear[1], $monthdayyear['day'][0], $monthdayyear[0]);
$now = time();
if ($date >= $now ) {
        $upcoming = TRUE;
    }    else {
        $upcoming = FALSE;
        }
var_dump($upcoming); // it give me false 
echo "<br />";
echo $date; // 1181473200
echo "<br />";
echo $now; // 1181493065
?>