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 difference between md5 and SHA256?
Which is the correct way to check if a session has already been started ?
What is the use of pear in php?
What is implode() in php?
Tell me how a constant is defined in a php script?
What is api used for?
Can php replace javascript?
List some string function name in php?
What is the use of anonymous function in php?
What is cakephp framework?
Does exist in php?
What is printf in php?
What is PHP's configuration file called?
What does PEAR stands for?
Where is the functions php in wordpress?