Changing time zone with date_default_timezone_set() : date_default_timezone_set « Date « PHP






Changing time zone with date_default_timezone_set()

 
<?php
$now = time();
date_default_timezone_set('America/New York');
print date('c', $now);
date_default_timezone_set('Europe/Paris');
print date('c', $now);
?>
  
  








Related examples in the same category

1.Handling DST with date_default_timezone_set()