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 create and destroy cookies in php?
Write a program in php to find the occurrence of a word in a string?
What is PECL?
What is binary safe string?
How the web server interprets php and interacts with the client?
Tell me how can we pass the variable through the navigation between the pages?
What is crypt () in php?
What is the difference between core php and php?
Explain about getters and setters in php?
How do I run a php script in windows?
What is php written in?
How are variables declared in php?
How can you make a connection with mysql server using php?
Suppose the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?
Is session a cookie?