fork(5) download
  1. <?php
  2.  
  3. // assume we are in London
  4. date_default_timezone_set('Europe/London');
  5.  
  6. // assume that today is March 25, 2012
  7. $date1 = new DateTime("2012-03-25 01:00:00");
  8. $date2 = new DateTime("2012-03-25 02:00:00");
  9.  
  10. // and...
  11. if ($date1 == $date2) {
  12. echo "WTF?!? Equal???";
  13. }
  14.  
Success #stdin #stdout 0.03s 13112KB
stdin
Standard input is empty
stdout
WTF?!? Equal???