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);
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.