migration51.datetime.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 66 行
HTML
66 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Date/time support</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="migration51.extensions.html">Extensions</a></div> <div class="next" style="text-align: right; float: right;"><a href="migration51.databases.html">Changes in database support</a></div> <div class="up"><a href="migration51.html">Migrating from PHP 5.0.x to PHP 5.1.x</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="migration51.datetime" class="section"> <h2 class="title">Date/time support</h2> <p class="para"> Date/time support has been fully rewritten in PHP 5.1.x, and no longer uses the system settings to 'know' the timezone in operation. It will instead utilize, in the following order: </p> <ul class="itemizedlist"> <li class="listitem"> <p class="para"> The timezone set using the <a href="function.date-default-timezone-set.html" class="function">date_default_timezone_set()</a> function (if any) </p> </li> <li class="listitem"> <p class="para"> The TZ environment variable (if non empty) </p> </li> <li class="listitem"> <p class="para"> "magical" guess (if the operating system supports it) </p> </li> <li class="listitem"> <p class="para"> If none of the above options succeeds, UTC </p> </li> </ul> <div class="informalexample"> <p class="para"> To ensure accuracy (and avoid an <b><tt>E_STRICT</tt></b> warning), you will need to define your timezone in your <var class="filename">php.ini</var> using the following format: </p> <p class="para"> date.timezone = Europe/London </p> </div> <p class="para"> The supported timezones are listed, in this format, in the <a href="timezones.html" class="link">timezones appendix</a>. </p> <p class="para"> Also note that <a href="function.strtotime.html" class="function">strtotime()</a> now returns <b><tt>FALSE</tt></b> on failure, instead of -1. </p> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="migration51.extensions.html">Extensions</a></div> <div class="next" style="text-align: right; float: right;"><a href="migration51.databases.html">Changes in database support</a></div> <div class="up"><a href="migration51.html">Migrating from PHP 5.0.x to PHP 5.1.x</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?