需要在IST(印度標準時間)當前時間,存儲在PHP變量UTC時間轉換前一小時,並使用PHP其存儲到另一個變量。如何將目前的IST時間轉換爲UTC時間?還需要找到時間UTC時間
<?php
date_default_timezone_set('Asia/Kolkata');
$Present=date('Y-m-d H:i');
echo $Present; //to be converted to utc
$GMT= gmdate('Y-m-d H:i', strtotime($Present));
?>
[PHP轉換日期時間爲UTC(可能的重複http://stackoverflow.com/questions/2095703/php-convert-datetime-to-utc) – NID