fork download
  1. <?php
  2.  
  3. $d1 = new DateTime();
  4. echo $d1->format('Y-m-d H:i:s');
  5.  
  6. echo "\n\n";
  7. // now set the time for the server to be diff
  8. date_default_timezone_set('Europe/Istanbul');
  9. $d2 = new DateTime();
  10. echo $d2->format('Y-m-d H:i:s');
Success #stdin #stdout 0.01s 82624KB
stdin
Standard input is empty
stdout
2018-10-26 17:40:15

2018-10-26 20:40:15