Answer Posted / arunkumar.s
Hello friends,
Following time zones are used EST,CST,MST,PST,AKST,HST. If
you want to get EST time then,
<?php
putenv('TZ=EST');
echo date("H:i:s :a");
?>
All other time zone's
<?php
putenv('TZ=EST');
echo date("H:i:s :a");
echo "<br/><br/>";
putenv('TZ=CST');
echo date("H:i:s :a");
echo "<br/><br/>";
putenv('TZ=MST');
echo date("H:i:s :a");
echo "<br/><br/>";
putenv('TZ=PST');
echo date("H:i:s :a");
echo "<br/><br/>";
putenv('TZ=AKST');
echo date("H:i:s :a");
echo "<br/><br/>";
putenv('TZ=HST');
echo date("H:i:s :a");
?>
Pls check and try
All the best
Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
What is rtrim php?
How to reset/destroy a cookie in php?
Explain php split() function.
Tell me what types of loops exist in php?
What is difference between strstr() and stristr()?
What is the Default syntax used in PHP?
Do you know is it possible to extend the execution time of a php script?
Why do we use php?
Explain about switch statement in PHP?
How can we display information of a variable and readable by a human with php?
What is $_ post in php?
What is the use of get and post method in php?
Explain the difference between unlink() and unset()?
What is the use of final class in php?
What is global array in php?