Gregarius中文日期格式问题解决办法
(编辑:jimmy 日期: 2024/11/29 浏览:3 次 )
复制代码 代码如下:
function rss_locale_date ($fmt, $ts, $addTZOffset = true) {
if (isset($_SERVER["WINDIR"])) {
//%e doesnt' exists under windows!
$fmt=str_replace(”%e”,”%#d”,$fmt);
}
if ($addTZOffset) {
return iconv(”UTF-8″, “utf-8″, strftime($fmt, $ts +3600 * getConfig('rss.config.tzoffset')));
//return utf8_encode(strftime($fmt, $ts +3600 * getConfig('rss.config.tzoffset')));
}
return iconv(”UTF-8″, “utf-8″, strftime($fmt, $ts));
//return utf8_encode(strftime($fmt, $ts));
}
function rss_locale_date ($fmt, $ts, $addTZOffset = true) {
if (isset($_SERVER["WINDIR"])) {
//%e doesnt' exists under windows!
$fmt=str_replace(”%e”,”%#d”,$fmt);
}
if ($addTZOffset) {
return iconv(”UTF-8″, “utf-8″, strftime($fmt, $ts +3600 * getConfig('rss.config.tzoffset')));
//return utf8_encode(strftime($fmt, $ts +3600 * getConfig('rss.config.tzoffset')));
}
return iconv(”UTF-8″, “utf-8″, strftime($fmt, $ts));
//return utf8_encode(strftime($fmt, $ts));
}
下一篇:PHP下用rmdir实现删除目录的三种方法小结