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 |
How do you define a constant in php?
What is self in php?
How to create a text file in PHP?
Steps for the payment gateway processing?
Can php run on windows server?
sort term descripttion form, report and uery
Which function parses an English textual date or time into Unix timestamp in PHP.
Which function would you use to format date information in php?
Why is node js better than php?
Explain about getters and setters in php?
How to get the number of visitors in a site?
What is difference between strstr() and stristr()?