gmstrftime
(PHP3 >= 3.0.12 , PHP4 >= 4.0RC2)
gmstrftime --- 按照場所設定將格林威治時間/日期格式化
語法 :
string gmstrftime(string format, int timestamp)說明 :
作用與strftime( )相同,不同處在於這個函式傳回的時間是格林威治標準時間,例如當執行在東部的標準時間(GMT -0500)時,下面的第一行會列出"Dec 31 1998 20:00:00",第二行會列出"Jan 01 1999 01:00:00"。
Example :
<?php
setlocale ('LC_TIME', 'en_US');
echo strftime ("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98))."\n";
echo gmstrftime ("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98))."\n";
?>
參考 : strftime( )