Home  >  Article  >  Backend Development  >  Gregarius Chinese date format problem solution_PHP tutorial

Gregarius Chinese date format problem solution_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:52:51714browse

复制代码 代码如下:

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));  
}

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/318851.htmlTechArticle复制代码 代码如下: functionrss_locale_date($fmt,$ts,$addTZOffset=true){ if(isset($_SERVER["WINDIR"])){ //%edoesnt'existsunderwindows! $fmt=str_replace(”%e”,”%#d”,$f...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn