$_SESSION['timezone']和$GLOBALS['_CFG']['timezone']是哪里来的呢

2016-07-07 15:00 来源:www.chinab4c.com 作者:ecshop专家

  1. function local_mktime($hour = NULL , $minute= NULL, $second = NULL,$month = NULL,$day = NULL,$year = NULL)
  2. {
  3. $timezone = isset($_SESSION['timezone']) ? $_SESSION['timezone'] : $GLOBALS['_CFG']['timezone'];

  4. /**
  5. * $time = mktime($hour, $minute, $second, $month, $day, $year) - date('Z') + (date('Z') - $timezone * 3600)
  6. * 先用mktime生成时间戳,再减去date('Z')转换为GMT时间,然后修正为用户自定义时间。以下是化简后结果
  7. **/
  8. $time = mktime($hour, $minute, $second, $month, $day, $year) - $timezone * 3600;

  9. return $time;
  10. }
复制代码

回答:
一个是时区的配置文件设置。一个是INIT。PHP里面的

还是不懂,不过谢谢你了!