Sending time with timezone from PHP to flash

Posted by jimbo on Stack Overflow See other posts from Stack Overflow or by jimbo
Published on 2010-05-10T12:30:17Z Indexed on 2010/05/10 12:34 UTC
Read the original article Hit count: 224

Filed under:
|
|

I am trying to send the time to flash but set to the currently timezone. When you view the below even though the echo date, looks like its working the $time is the same. When i test in flash I get the extra hour added. Any help tips welcome on this one...

$format = "d/m/Y H:m:s";
$timezone = "Europe/Amsterdam";
date_default_timezone_set($timezone);

echo "<h1>Timezone ".$timezone."</h1>";
$date = date($format);
echo "<h3>Date: ".$date."<h3>";
$time = strtotime($date);
echo "<h3>Time: ".$time."<h3>";
$date2 = date($format, $time);
echo "<h3>Reverse: ".$date2."<h3>";


$timezone = "Europe/London";
date_default_timezone_set($timezone);

echo "<h1>Timezone ".$timezone."</h1>";
$date = date($format);
echo "<h3>Date: ".$date."<h3>";
$time = strtotime($date);
echo "<h3>Time: ".$time."<h3>";
$date2 = date($format, $time);
echo "<h3>Reverse: ".$date2."<h3>";


?>

© Stack Overflow or respective owner

Related posts about flash

Related posts about php