Chinaunix首页 | 论坛 | 博客
  • 博客访问: 288800
  • 博文数量: 28
  • 博客积分: 1575
  • 博客等级: 上尉
  • 技术积分: 355
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-22 18:42
个人简介

阿里:高级运维工程师;大众点评:资深运维工程师;目前在创业公司:运维经理

文章分类

全部博文(28)

文章存档

2014年(1)

2013年(5)

2012年(4)

2011年(3)

2010年(2)

2009年(13)

我的朋友

分类:

2009-09-21 20:53:19

在php中调用时间函数
echo date("Y/m/d");
?> 
有警告(依赖系统的时区设置不安全)
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /usr/local/apache2/htdocs/php/date.php on line 3
2009/09/21
解决方法(设置一个时区即可)
date_default_timezone_set('UTC');
echo date("Y/m/d");
?> 
 
阅读(1286) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~