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 |
I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what is the problem?
What is http php?
What types of Data Can Be Used as Array Keys?
What are php expressions?
coding for deleting items form data base on select
Why php is used in html?
How to send email using php script?
Explain difference between urlencode and urldecode?
Does wordpress run on php 7?
Why do we use polymorphism in php?
What is singleton pattern in php?
Tell me how the result set of mysql be handled in php?