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 |
Where can I find php ini file?
Is empty function c++?
Explain Constant in Class?
To find out the current year is leap year or not which date() function we've to use.Give the syntax also
Is PHP runs on different platforms (Windows, Linux, Unix, etc.)?
How session manage in wordpress
What is mysql_fetch_object?
How to genrate report in wordpress cms
Why is used in php?
What is better .net or php?
can anyone tel me about the Expression engine Note:Its a CMS in Php
How can we know the total number of elements of Array?