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
How to check curl is enabled or not in PHP
What is the use of "echo" in php?
Can we override magic methods in php?
What is the difference between laravel and php?
What is cookie?
How can I display text with a php script?
Which function is used to strip whitespace?
What is the expansion of LAMP?
Tell me how to execute an sql query? How to fetch its result?
Do you know what is the differences between $a != $B and $a !== $B?
What are php loops?
What is __ construct in php?
What are the different ways to login to a remote server?
What is in a cookie?
What is the difference between query and question?