when it should produce:
Sydney: 2004-09-01 13:15:11 pm
NY: 2004-08-31 23:15:11 pm
Is there a bug?
Tried this:
$id = "Australia/ACT";
$today = date("Y-m-d H:i:s");
$date = new Date($today);
$date->setTZbyID($id);
$ny = new Date_Timezone("America/New_York");
print "Sydney: " . $date->format("%Y-%m-%d %H:%M:%S %p") . "<br>\n";
$date->convertTZ($ny);
print "NY: " . $date->format("%Y-%m-%d %H:%M:%S %p") . "<br>\n";
Now produces:
Sydney: 2004-09-01 14:36:59 pm
NY: 2004-08-31 23:36:59 pm
NY should be 2004-08-31 24:36:59 pm (or is it am?)
Close but no cigar.
I was hoping to get the date without having to set the timezone for the current server, but I'll code it in if I have to.
Leonie