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 |
What is difference between static and final in php?
Is strcmp case sensitive?
Is it possible to remove the html tags from data?
What is php simple definition?
What are the main error types in php and how do they differ?
what does this symbol mean in php?
How we can convert dynamic url into static url? plz provide code.
How does php isset work?
Does wordpress still use php?
"$this" what type of object it is?
Which functions are used to count the total number of array elements in php?
What type of inheritance that PHP supports?
15 Answers Webwing Technologies,