Q:

Write a PHP script to display time in a specified timezone

0

Write a PHP script to display time in a specified timezone

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

<?php
ini_set('date.timezone','America/New_York'); 
echo '<p>'.date("g:i A").'</p>'."\n";
?>

Sample Output:

7:39 AM

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now