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 block direct directory access in PHP?
Explain some of the php string functions?
What do you use php for?
> symbol is used to redirect the output of a command. State Whether True or False?
How a constant is defined in a php script?
What is the expansion of LAMP?
What is a query in php?
Swap two variables value without using third variable in php ?
Why sessions are used in php?
Tell me what is the definition of a session?
What is isset function in php?
How to execute a php script from the command line?
What are the steps involved to run php?
How can you send email in php?
What is constructor and destructor?