PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<gmmktimeidate>
Last updated: Mon, 16 Jul 2012

gmstrftime

(PHP 3 >= 3.0.12, PHP 4, PHP 5)

gmstrftime --  根据区域设置格式化 GMT/UTC 时间/日期

说明

string gmstrftime ( string format [, int timestamp] )

strftime() 的行为相同,只除了返回时间是格林威治标准时(GMT)。例如,当在东部标准时(EST,GMT -500)运行时,下面第一行显示“Dec 31 1998 20:00:00”,而第二行显示“Jan 01 1999 01:00:00”。

例子 1. gmstrftime() 例子

<?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()




<gmmktimeidate>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST