Changing time zone with an environment variable : localtime « Date « PHP






Changing time zone with an environment variable

 
<?php
putenv('TZ=PST8PDT');
$california_time_parts = localtime();
?>
  
  








Related examples in the same category

1.Using localtime()
2.Finding time parts
3.Simple time zone calculation
4.Return array from localtime( )