<?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 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.gmdate.php',
    1 => 'gmdate',
    2 => 'Formatta una data/ora GMT/UTC',
  ),
  'up' => 
  array (
    0 => 'ref.datetime.php',
    1 => 'Date/Time Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.gettimeofday.php',
    1 => 'gettimeofday',
  ),
  'next' => 
  array (
    0 => 'function.gmmktime.php',
    1 => 'gmmktime',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'it',
    '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">Formatta una data/ora GMT/UTC</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.gmdate-description">
  <h3 class="title">Descrizione</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"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$timestamp</code><span class="initializer"> = time()</span></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   Identica alla funzione <span class="function"><a href="function.date.php" class="function">date()</a></span> eccetto che
   l&#039;orario restituito è Greenwich Mean Time (GMT). 
  </p>
 </div>
 

 <div class="refsect1 parameters" id="refsect1-function.gmdate-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">format</code></dt>
     <dd>
      <p class="para">
       Il formato della data restituita è <span class="type"><a href="language.types.string.php" class="type string">string</a></span>. Vedere le opzioni di
       formattazione per la funzione <span class="function"><a href="function.date.php" class="function">date()</a></span>.
      </p>
     </dd>
    
    
    
<dt><code class="parameter">timestamp</code></dt><dd><p class="para">
Il parametro opzionale <code class="parameter">timestamp</code> è un 
<span class="type"><a href="language.types.integer.php" class="type integer">integer</a></span> timestamp Unix che ha come default
l&#039;ora locale attuale se un <code class="parameter">timestamp</code> non è fornito. In altre 
parole, ha come default il valore di <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">Valori restituiti</h3>
  <p class="para">
   Restituisce una stringa di data formattata. Se viene usato un valore non numerico per 
   <code class="parameter">timestamp</code>, viene restituito <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> e viene 
   emesso un errore di livello <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong>.
  </p>
 </div>
   

 <div class="refsect1 changelog" id="refsect1-function.gmdate-changelog">
  <h3 class="title">Log delle modifiche</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Versione</th>
       <th>Descrizione</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.1.0</td>
       <td>
        Il range valido di un timestamp è tipicamente da Venerdì, 13 Dicembre
        1901 20:45:54 GMT a Martedì, 19 Gennaio 2038 03:14:07 GMT. (Queste sono
        le date che corrispondono ai valori minimo e massimo per
        un intero a 32-bit con il segno). Comunque, prima di PHP 5.1.0 questo range era limitato
        da 01-01-1970 a 01-19-2038 su alcuni sistemi (per esempio Windows).
       </td>
      </tr>

      <tr>
       <td>5.1.1</td>
       <td>
        Ci sono delle <a href="datetime.constants.php" class="link">costanti</a> utili
        di formati data/orario standard che possono essere usate per specificare il
        parametro <code class="parameter">format</code>.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.gmdate-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 Esempio di <span class="function"><strong>gmdate()</strong></span></strong></p>
    <div class="example-contents"><p>
     Quando eseguita in Finlandia (GMT +0200), la prima riga sotto stampa &quot;Jan 01
     1998 00:00:00&quot;, mentre la seconda stampa &quot;Dec 31 1997 22:00:00&quot;.
    </p></div>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">"M d Y H:i:s"</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">));<br />echo </span><span style="color: #0000BB">gmdate</span><span style="color: #007700">(</span><span style="color: #DD0000">"M d Y H:i:s"</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">));<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.gmdate-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.date.php" class="function" rel="rdfs-seeAlso">date()</a> - Formatta un timestamp Unix</span></li>
    <li><span class="function"><a href="function.mktime.php" class="function" rel="rdfs-seeAlso">mktime()</a> - Restituisce il timestamp Unix per una data</span></li>
    <li><span class="function"><a href="function.gmmktime.php" class="function" rel="rdfs-seeAlso">gmmktime()</a> - Riceve l'UNIX timestamp per una data GMT</span></li>
    <li><span class="function"><a href="function.strftime.php" class="function" rel="rdfs-seeAlso">strftime()</a> - Formatta una data/orario locale accordandola/o alle impostazioni locali according to locale settings</span></li>
   </ul>
  </p>
 </div>

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