Skip to content

Instantly share code, notes, and snippets.

@pdt256
Created June 6, 2012 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdt256/2885080 to your computer and use it in GitHub Desktop.
Save pdt256/2885080 to your computer and use it in GitHub Desktop.
PHP go live date
<?php
$now = time();
$live_date = strtotime('2012-03-20 00:00:00');
echo $now . ' - ' . $live_date;
echo "\n";
echo date('c', $now) . ' - ' . date('c', $live_date);
echo "\n";
if ($now >= $live_date) {
echo 'YES';
} else {
echo 'NO';
}
echo "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment