Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


how can i get USA time using php...



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

Post New Answer

More PHP Interview Questions

Explain what is the use of "echo" in php?

0 Answers  


How can I add text to an image?

1 Answers   IPSR Solutions, Rushmore Consultancy,


Can a super () and this () keywords be in same constructor?

0 Answers  


What do you mean by MVC ?

3 Answers   NIIT,


How does api connect to database?

0 Answers  






Explain about the $_GET variable of PHP?

0 Answers  


when ever the user logged in the database table the current registered date will be appeared

3 Answers  


What is strlen function in php?

0 Answers  


What php framework does wordpress use?

0 Answers  


what are the basic steps to installation php4+mysql4+phpmyadmin on IIS web server?. Pls write the complete steps.

2 Answers  


Which of the delimiter is ASP style?

0 Answers  


What is $_ get?

0 Answers  






Categories