自定义各类php中的时间函数

来源:互联网 发布:手机充值卡 非网络 编辑:程序博客网 时间:2024/05/18 02:33
function gmtime(){    return (time() - date('Z'));}function server_timezone(){    if (function_exists('date_default_timezone_get'))    {        return date_default_timezone_get();    }    else    {        return date('Z') / 3600;    }}function local_mktime($hour = NULL , $minute= NULL, $second = NULL,  $month = NULL,  $day = NULL,  $year = NULL){    $timezone = isset($_SESSION['timezone']) ? $_SESSION['timezone'] : $GLOBALS['_CFG']['timezone'];       $time = mktime($hour, $minute, $second, $month, $day, $year) - $timezone * 3600;    return $time;}


 

原创粉丝点击