Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 8512

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>Get behavior for handling skipped wall time</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="intlcalendar.getrepeatedwalltimeoption.html">IntlCalendar::getRepeatedWallTimeOption</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="intlcalendar.gettime.html">IntlCalendar::getTime</a></div>
 <div class="up"><a href="class.intlcalendar.html">IntlCalendar</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="intlcalendar.getskippedwalltimeoption" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">IntlCalendar::getSkippedWallTimeOption</h1>
  <p class="verinfo">(PHP 5.5.0, PECL &gt;= 3.0.0a1)</p><p class="refpurpose"><span class="refname">IntlCalendar::getSkippedWallTimeOption</span> &mdash; <span class="dc-title">Get behavior for handling skipped wall time</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-intlcalendar.getskippedwalltimeoption-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span> <span class="methodname"><strong>IntlCalendar::getSkippedWallTimeOption</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   Gets the current strategy for dealing with wall times that are skipped
   whenever the clock is forwarded during dailight saving time start transitions.
   The default value is <strong><code>IntlCalendar::WALLTIME_LAST</code></strong>.
  </p>
  <p class="para">
   The calendar must be <a href="intlcalendar.setlenient.html" class="link">lenient</a> for this option to have
   any effect, otherwise attempting to set a non-existing time will cause an
   error.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-intlcalendar.getskippedwalltimeoption-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">This function has no parameters.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-intlcalendar.getskippedwalltimeoption-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   One of the constants <strong><code>IntlCalendar::WALLTIME_FIRST</code></strong>,
   <strong><code>IntlCalendar::WALLTIME_LAST</code></strong> or
   <strong><code>IntlCalendar::WALLTIME_NEXT_VALID</code></strong>.
  </p>
 </div>



 <div class="refsect1 examples" id="refsect1-intlcalendar.getskippedwalltimeoption-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-2611">
   <p><strong>Example #1  <span class="function"><strong>IntlCalendar::getSkippedWallTimeOption()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />ini_set</span><span style="color: #007700">(</span><span style="color: #DD0000">'date.timezone'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Europe/Lisbon'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">ini_set</span><span style="color: #007700">(</span><span style="color: #DD0000">'intl.default_locale'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'en_US'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">ini_set</span><span style="color: #007700">(</span><span style="color: #DD0000">'intl.error_level'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">E_WARNING</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//On&nbsp;March&nbsp;31st&nbsp;at&nbsp;0100,&nbsp;the&nbsp;clock&nbsp;goes&nbsp;forward&nbsp;1&nbsp;hour&nbsp;and&nbsp;from&nbsp;GMT+00&nbsp;to&nbsp;GMT+01<br /></span><span style="color: #0000BB">$cal&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">IntlGregorianCalendar</span><span style="color: #007700">(</span><span style="color: #0000BB">2013</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2&nbsp;</span><span style="color: #FF8000">/*&nbsp;March&nbsp;*/</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">31</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">30</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">isLenient</span><span style="color: #007700">(),&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;true<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getSkippedWalltimeOption</span><span style="color: #007700">()&nbsp;</span><span style="color: #FF8000">//&nbsp;0&nbsp;WALLTIME_LAST<br /></span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$formatter&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">IntlDateFormatter</span><span style="color: #007700">::</span><span style="color: #0000BB">create</span><span style="color: #007700">(<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">NULL</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">IntlDateFormatter</span><span style="color: #007700">::</span><span style="color: #0000BB">FULL</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">IntlDateFormatter</span><span style="color: #007700">::</span><span style="color: #0000BB">FULL</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'UTC'<br /></span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$formatter</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">format</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getTime</span><span style="color: #007700">()&nbsp;/&nbsp;</span><span style="color: #0000BB">1000</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setSkippedWallTimeOption</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlCalendar</span><span style="color: #007700">::</span><span style="color: #0000BB">WALLTIME_FIRST</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getSkippedWalltimeOption</span><span style="color: #007700">());&nbsp;</span><span style="color: #FF8000">//&nbsp;1&nbsp;WALLTIME_FIRST<br /></span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlCalendar</span><span style="color: #007700">::</span><span style="color: #0000BB">FIELD_HOUR_OF_DAY</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$formatter</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">format</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getTime</span><span style="color: #007700">()&nbsp;/&nbsp;</span><span style="color: #0000BB">1000</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setSkippedWallTimeOption</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlCalendar</span><span style="color: #007700">::</span><span style="color: #0000BB">WALLTIME_NEXT_VALID</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getSkippedWalltimeOption</span><span style="color: #007700">());&nbsp;</span><span style="color: #FF8000">//&nbsp;2&nbsp;WALLTIME_NEXT_VALID<br /></span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlCalendar</span><span style="color: #007700">::</span><span style="color: #0000BB">FIELD_HOUR_OF_DAY</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$formatter</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">format</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getTime</span><span style="color: #007700">()&nbsp;/&nbsp;</span><span style="color: #0000BB">1000</span><span style="color: #007700">));</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>The above example will output:</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
bool(true)
int(0)
string(40) &quot;Sunday, March 31, 2013 at 1:30:00 AM GMT&quot;
int(1)
string(41) &quot;Sunday, March 31, 2013 at 12:30:00 AM GMT&quot;
int(2)
string(40) &quot;Sunday, March 31, 2013 at 1:00:00 AM GMT&quot;
</pre></div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-intlcalendar.getskippedwalltimeoption-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="methodname"><a href="intlcalendar.getrepeatedwalltimeoption.html" class="methodname" rel="rdfs-seeAlso">IntlCalendar::getRepeatedWallTimeOption()</a> - Get behavior for handling repeating wall time</span></li>
    <li class="member"> <span class="methodname"><a href="intlcalendar.setskippedwalltimeoption.html" class="methodname" rel="rdfs-seeAlso">IntlCalendar::setSkippedWallTimeOption()</a> - Set behavior for handling skipped wall times at positive timezone offset transitions</span></li>
    <li class="member"> <span class="methodname"><a href="intlcalendar.setrepeatedwalltimeoption.html" class="methodname" rel="rdfs-seeAlso">IntlCalendar::setRepeatedWallTimeOption()</a> - Set behavior for handling repeating wall times at negative timezone offset transitions</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="intlcalendar.getrepeatedwalltimeoption.html">IntlCalendar::getRepeatedWallTimeOption</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="intlcalendar.gettime.html">IntlCalendar::getTime</a></div>
 <div class="up"><a href="class.intlcalendar.html">IntlCalendar</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>