December 21, 201114 yr My PHP is not great at the best of times and I'm struggling to get the current time for the following countries; UK U.S.A. Europe (Continent) Canada Switzerland Australia New Zealand China Japan Any ideas how I would go about it?
December 21, 201114 yr Author I'm trying to include this in a Wordpress page (using the HTML editor) but it won't run the <script type="text/javascript"> new showLocalTime("timecontainer", "server-ssi", -60, "short") </script> Any ways around this?
December 21, 201114 yr Were you not looking for a php solution? http://www.ultramegatech.com/blog/2009/04/working-with-time-zones-in-php/
December 21, 201114 yr Author I have came up with this; <?php date_default_timezone_set('Australia/Melbourne'); $date = date('G:i', time()); echo $date; ?> Will this work for each country? All I need to do is display the current time in each of the countries. Obviously change the default timezone to each country, if there all available :S Edited December 21, 201114 yr by lozenges
Create an account or sign in to comment