PHP基础,时间函数库

date_default_timezone_set($timezone); 动态设置时区,当前页面有效
date_default_timezone_get();
<strong>亚洲时区</strong>
  PRC 中户人民共和国   Asia/Shanghai
1.修改php配置文件,date.timezone = PRC,重启服务器  php.ini
2.date_default_timezone_set($timezone); 动态设置时区,当前页面有效
3.ini_set():运行时设置PHP的配置选项
4.ini_get*(:获得配置选项的值
5.strrotime的使用:将英文文本的日期或时间转换成时间戳
6.检测闰年  date('L');是返回1,不是返回0
<strong>时间戳:从一个时间点到当前经历的秒数</strong>
     获取时间戳:time();
     将指定日期转换成时间戳:mktime(小时,分钟,秒,月,日,年);
 strrotime的使用:将英文文本的日期或时间转换成时间戳
<strong>微秒及其其他日常时间函数的使用</strong>
 * 通过microtime()获取微秒 microtime(微秒,时间戳)
 * microtime(true) 返回一个四位的浮点数
 * 通过微秒实现计算PHP的执行时间
 * getdate() 返回信息数组