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 |
Is facebook still in php?
How to add different images in php program like a job site.......
Is nan in php?
How do you access a get requests url parameter with php?
What are the features of php?
What are encryption functions in php?
Explain Magento's autoload functionality and how to instantiate classes? What is the process you take when theming a store? Talk about Magento collections and how you use them?
What is difference between strstr() and stristr() in PHP?
Explain what is memcache?
What does accessing a class via :: means?
Does php need html?
Php program to generate fibonacci series?