[英]different Timestamps when using strtotime() in PHP and UNIX_TIMESTAMP() in MySQL
[英]strtotime() breaking in new php version when converting mysql timestamp
我正在轉換我的mysql時間戳
$timeStampDate=date("F j, Y g:ia", strtotime($row["projectTimeStamp"]));
不幸的是,新的php版本不喜歡這樣,並且給了我一系列錯誤。
Strict Standards: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings.
我一直在玩.htaccess,添加php_value date.timezone Europe/London
但這是一個問題。
我只需要mysql NOW()在$ variable中可讀。
我討厭軟件更新。 PHP Version 5.2.17
您必須使用date_default_timezone_set()
設置默認時區
或在php.ini中: datetime.timezone
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.