I have a script that shows Local time for different cities at the same time. The code is (for example):
The problem is that the list (of World Clocks) is long, so adding
There is a way to manually add hours to every clock, but daylight savings change....
So is there is a way (other than manually adding hours) to get the time for every timezone (city) without always using
Any Suggestion Will Be Helpful
PHP Code:
<?php
// Time in Paris
date_default_timezone_set('Europe/Paris');
echo(date("h:i:s") . "<br />");
// Time in Athens
date_default_timezone_set('Europe/Athens');
echo(date("h:i:s") . "<br />");
// Time in London
date_default_timezone_set('Europe/London');
echo(date("h:i:s") . "<br />");
// Time in New York
date_default_timezone_set('America/New_York');
echo(date("h:i:s") . "<br />");
// Time in Chicago
date_default_timezone_set('America/Chicago');
echo(date("h:i:s") . "<br />");
?>
date_default_timezone_set
on every line isn't practical...There is a way to manually add hours to every clock, but daylight savings change....
So is there is a way (other than manually adding hours) to get the time for every timezone (city) without always using
date_default_timezone_set
?Any Suggestion Will Be Helpful

Comment