惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
Google Developers Blog
S
SegmentFault 最新的问题
Microsoft Security Blog
Microsoft Security Blog
J
Java Code Geeks
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
P
Proofpoint News Feed
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
L
LangChain Blog
F
Fortinet All Blogs
C
Check Point Blog
博客园_首页
I
InfoQ
Jina AI
Jina AI
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
美团技术团队
Vercel News
Vercel News
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - 大象怒怒

12个球称三次的问题 电脑嘀嘀响的原因(电脑变慢) javascript的调试工具 PHP 解析xml(包含非英文字符) Linux下配置PHP运行环境 安装Oracle(粗略写了下) PHP5+apache_2.0.50+MySQL4.0+SQLServer安装方法 - 大象怒怒 - 博客园 About SAPLogon(SAP登录 密码不能输入) XP下安装SQL2000企业版 游戏代码部分-------client包(MyClient类和ReadThread类) 游戏代码部分-------server包(MyServer类和ReadThread类) 会计关键术语(全) SQL 新增/修改 表字段列的类型等 电压表.ASM 交换机MAC地址表的形成过程动态演示 会计部分关键术语3 会计部分关键术语2 更改表字段的描述 SQL语句实现 vb 对注册表操作 会计部分关键术语1
PHP 怎样取得本地化时间
大象怒怒 · 2006-08-08 · via 博客园 - 大象怒怒

 //本地时区标识符
 $timezone_identifier = "Asia/Hong_Kong";
//设定用于一个脚本中所有日期时间函数的本地默认时区
 date_default_timezone_set($timezone_identifier);
 $aToday = getdate();

这样就可以取得本地区日期时间 因为默认取得是格林威治时间0时区

也可以设置php.ini
[Date]
; Defines the default timezone used by the date functions
date.timezone =
"Asia/Hong_Kong"

重新启动apache
 $aToday = getdate();
这样就可以取得本地区日期时间