Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 9236

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Date/time support</title>

 </head>
 <body><div class="manualnavbar" 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 &#039;know&#039; 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  <span class="function"><a href="function.date-default-timezone-set.html" class="function">date_default_timezone_set()</a></span>
     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">
     &quot;magical&quot; 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 <strong><code>E_STRICT</code></strong> 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  <span class="function"><a href="function.strtotime.html" class="function">strtotime()</a></span> now returns <strong><code>FALSE</code></strong> on
   failure, instead of -1. 
  </p>
 </div><hr /><div class="manualnavbar" 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>