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 alias in php?
What is the difference between characters 34 and x34?
What is variable and data type?
can any one find and tell the difference between dot net and php which one is best ? which one we get more salary? which one is stable and which one is best for freshers and also better in future and carrer ? which one we wil get more salary sir ? please send ur valuable suggestions to kiranpulsar2007@gmail.com
What is the use of addslashes in php?
hai plz inform me specific books fo0r paper1,paper2 and paper 3 of group2 examination... plz giv me at the earliest......
What is the difference between htmlentities and htmlspecialchars in php?
Which is better php or wordpress?
Why session is required?
How to upload file in php?
What are the rules to declare a php variables?
How to remove leading and trailing spaces from user input values?