how can i get USA time using php...
Answer / 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 |
Can we use include ("xyz.php") two times in a php page "index.php"?
What is string function sql?
Explain $_FILES Superglobal Array?
What is the best way to test the strpos() return value in php?
Does facebook use php framework?
What is the use of stripslashes in php?
Write a query to find the 2nd highest salary of an employee from the employee table?
What does a delimiter do in mysql?
Write down the code for save an uploaded file in php.
What is the difference between the include() and require() functions?
What is basename php?
What is preg_match?