<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.datetime.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.gmdate.php',
    1 => 'gmdate',
    2 => 'Format a GMT/UTC date/time',
  ),
  'up' => 
  array (
    0 => 'ref.datetime.php',
    1 => 'Функції Дати/часу',
  ),
  'prev' => 
  array (
    0 => 'function.gettimeofday.php',
    1 => 'gettimeofday',
  ),
  'next' => 
  array (
    0 => 'function.gmmktime.php',
    1 => 'gmmktime',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/datetime/functions/gmdate.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.gmdate" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gmdate</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">gmdate</span> &mdash; <span class="dc-title">Format a GMT/UTC date/time</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.gmdate-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>gmdate</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$format</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span> <code class="parameter">$timestamp</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   Identical to the <span class="function"><a href="function.date.php" class="function">date()</a></span> function except that
   the time returned is Greenwich Mean Time (GMT). 
  </p>
 </div>
 

 <div class="refsect1 parameters" id="refsect1-function.gmdate-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">format</code></dt>
     <dd>
      <p class="para">
       The format of the outputted date <span class="type"><a href="language.types.string.php" class="type string">string</a></span>. See the formatting
       options for the <span class="function"><a href="function.date.php" class="function">date()</a></span> function.
      </p>
     </dd>
    
    
    
<dt><code class="parameter">timestamp</code></dt><dd><p class="para">
Необов&#039;язковий параметр <code class="parameter">timestamp</code> — це позначка часу Unix
типу <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>, яка стандартно дорівнює поточному місцевому часу, якщо
<code class="parameter">timestamp</code> не вказаний або <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>. Тобто є результатом
функції <span class="function"><a href="function.time.php" class="function">time()</a></span>.
</p></dd>
   
   </dl>
  </p>
 </div>
   

 <div class="refsect1 returnvalues" id="refsect1-function.gmdate-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Returns a formatted date string.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.gmdate-changelog">
  <h3 class="title">Журнал змін</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Версія</th>
       <th>Опис</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.0.0</td>
       <td>
        <code class="parameter">timestamp</code> is nullable now.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.gmdate-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 <span class="function"><strong>gmdate()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />date_default_timezone_set</span><span style="color: #007700">(</span><span style="color: #DD0000">"Europe/Helsinki"</span><span style="color: #007700">);<br /><br />echo </span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">"M d Y H:i:s e"</span><span style="color: #007700">, </span><span style="color: #0000BB">mktime</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #0000BB">1</span><span style="color: #007700">, </span><span style="color: #0000BB">1</span><span style="color: #007700">, </span><span style="color: #0000BB">1998</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo </span><span style="color: #0000BB">gmdate</span><span style="color: #007700">(</span><span style="color: #DD0000">"M d Y H:i:s e"</span><span style="color: #007700">, </span><span style="color: #0000BB">mktime</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #0000BB">1</span><span style="color: #007700">, </span><span style="color: #0000BB">1</span><span style="color: #007700">, </span><span style="color: #0000BB">1998</span><span style="color: #007700">));</span></span></code></div>
    </div>

    <div class="example-contents"><p>Поданий вище приклад
виведе:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Jan 01 1998 00:00:00 Europe/Helsinki
Dec 31 1997 22:00:00 UTC</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.gmdate-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="datetimeimmutable.construct.php" class="methodname" rel="rdfs-seeAlso">DateTimeImmutable::__construct()</a> - Returns new DateTimeImmutable object</span></li>
    <li><span class="methodname"><a href="datetime.format.php" class="methodname" rel="rdfs-seeAlso">DateTimeInterface::format()</a> - Returns date formatted according to given format</span></li>
    <li><span class="function"><a href="function.date.php" class="function" rel="rdfs-seeAlso">date()</a> - Format a Unix timestamp</span></li>
    <li><span class="function"><a href="function.mktime.php" class="function" rel="rdfs-seeAlso">mktime()</a> - Get Unix timestamp for a date</span></li>
    <li><span class="function"><a href="function.gmmktime.php" class="function" rel="rdfs-seeAlso">gmmktime()</a> - Get Unix timestamp for a GMT date</span></li>
    <li><span class="methodname"><a href="intldateformatter.format.php" class="methodname" rel="rdfs-seeAlso">IntlDateFormatter::format()</a> - Format the date/time value as a string</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>