Gregarius中文日期格式问题解决办法
程序员文章站
2023-08-29 08:07:44
复制代码 代码如下: function rss_locale_date ($fmt, $ts, $addtzoffset ...
复制代码 代码如下:
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));
}