How to convert this date
2010-05-25 04:55:01 CST (America/Chicago)
to PST (America/Los开发者_如何学JAVA_Angeles) timezone?
Something like that (change the output format to suit your needs):
<?php
$dte = new DateTime('2010-05-25 04:55:01',
new DateTimeZone('America/Chicago'));
$dte->setTimeZone(new DateTimeZone('America/Los_Angeles'));
echo $dte->format(DateTime::COOKIE);
?>
Outputs:
Tuesday, 25-May-10 02:55:01 PDT
精彩评论