- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我已将我的 joomla 和 wordpress 文件从旧服务器更改为新服务器。在前端和管理方面,它的工作没有任何错误。但是在数据库(phpmyadmin)部分它显示了一些像这样的警告消息..
Warning: strtotime() [function.strtotime]: 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 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /usr/share/phpmyadmin/libraries/db_info.inc.php on line 88
Warning: strftime() [function.strftime]: 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 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /usr/share/phpmyadmin/libraries/common.lib.php on line 1483
你能建议一下,如何隐藏这些警告信息吗??
提前致谢。
最佳答案
你真的只是想隐藏错误消息还是你想解决问题,他们表示?
在你的新服务器上,你应该在你的 php.ini
文件中找到一个设置 date.timezone
被注释掉了。在这里,你必须指定你的服务器所在的时区。例如,我的服务器位于德国,所以我在这里使用 Europe/Berlin
:
date.timezone = Europe/Berlin
您可以在此处找到支持的时区的完整列表:
http://www.php.net/manual/en/timezones.php
更改此设置后,重新启动您的网络服务器,警告应该消失。
关于警告 : strtotime() Error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14978751/
在 PHP 中对 strtotime() 进行了一番研究之后,我注意到当您传入空格和/或点时,它会返回一个有效的时间戳。 var_dump(strtotime(" ")); var_dump(strt
这是我的代码: $testtime = str_replace('.', '-', '2009.07.08 17:01'); $timestamp = strtotime($testtime); ec
我有一个脚本,它从 excel 表中读取值并将它们插入到 sql 表中。我的问题是当脚本读取某些日期字段时,它会将它们设置为默认值:1970-01-01 01:00:00 我注意到当遇到“天”大于 1
我有 2 台服务器。他们都使用相同的操作系统:Ubuntu 14.04 服务器 + php-fpm。我不能让它们生成相同的 strtotime结果。 日期时间:2013-12-30 18:29:59第
我使用 ths 方法来查找两个时间戳之间的差异并获取这两个时间之间的秒数,然后像计数器一样用 jquery 刷新信息。 $diff = strtotime(date('Y-m-d H:i:s')) -
我正在构建一个日记,其中包含每周 View ,我认为我已经破解了,因为日期似乎是正确的。直到我的 MySQL 查询不断返回看似随机的结果,我才意识到这个月实际上被视为一天。 $week_number
date('m/d/Y', strtotime('-1.5 years')) 返回今天(2012 年 6 月 18 日),06/18/2017。 这是为什么,有没有办法让 strtotime 处理小数
有没有办法转换strtotime与 NSDate 类似的字符串(例如:给定日期的“-3 天”)? 最佳答案 参见 NSDate 的 +dateWithNaturalLanguageString: 。我
我遇到了一个奇怪的问题。当我执行 strtotime 时,它不会考虑原始日期的小时部分,并且它总是在午夜返回。我尝试进行研究,但找不到任何具体内容。 我有什么遗漏吗? $original_date
我有一些 php 可以更改从数据库检索的时间格式: $selectedDate = $_GET['date']; $formatedDate = date("Y-d-m",strtotime($sel
我愿意 strtotime("2008-09-04") 其中 09 是月份,04 是日期,我得到的结果是: 1220500800 2008 年 9 月 4 日星期四 04:00:00 GMT。这 4
我正在使用 strtotime($my_time); 创建我在 php 数学中使用的时间戳。 变量$my_time 是从数据库中提取的HH:mm:ss 24h 格式。 我正在设置时间,但我不知道生产日
任何人都可以向我解释这个例子中的 strtotime 函数有什么问题?我正在尝试计算日期之间的差异。 PHP 5.6.0 (cli)(内置:2014 年 8 月 28 日 08:03:51)当我执行这
我正在根据用户输入的日期、月份和年份值构建时间戳。 假设用户输入了一些错误的值并且日期是不存在的“31-02-2012”,那么我必须得到一个错误的返回。但这里将其转换为附近的另一个日期。精确到:“02
这个问题在这里已经有了答案: php strtotime() messes with date of a different year (1 个回答) 关闭 9 年前。 我正在尝试使用 pickad
我有一些 php 可以更改从数据库检索的时间格式: $selectedDate = $_GET['date']; $formatedDate = date("Y-d-m",strtotime($sel
我愿意 strtotime("2008-09-04") 其中 09 是月份,04 是日期,我得到的结果是: 1220500800 2008 年 9 月 4 日星期四 04:00:00 GMT。这 4
我正在尝试使用 strtotime 转换以下日期: 07/09/2009 17:01:27 这是 9 月 7 日的欧洲/伦敦时区格式 该功能正在反转月份和日期,有什么解决方法吗? 谢谢 最佳答案 更改
我有一个循环,其中日期以不同的格式出现,例如对于某些值,它会像 '10-13-2013 04:31' ,对于某些值,它会像 >'2013-10-14T22:14:40-0700'。我尝试将其存储在数据
嗨,我有一个查询,它从数据库中选择 `timestamp` >= '".$monS."' AND `timestamp` < '".$sunE."' 以下是 $monS 和 $sunE 的定义方式:
我是一名优秀的程序员,十分优秀!