string gmstrftime ( string $format [, int $timestamp ] )和 strftime() 的行为相同,只除了返回时间是格林威治标准时(GMT)。例如,当在东部标准时(EST,GMT -500)运行时,下面第一行显示[Dec 31 1998 2],而第二行显示[Jan 01 1999 01:00:00]。
Example #1 gmstrftime() 例子<?php
setlocale(LC_TIME, 'en_US');
echo strftime("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98))." ";
echo gmstrftime("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98))." ";
?>
查看更多关于PHP gmstrftime 根据区域设置格式化 GMT/UTC 时间/日的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did7898