<?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 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.gmstrftime.php',
    1 => 'gmstrftime',
    2 => 'Formatiert eine Datums-/Zeitangabe in GMT/UTC-Format entsprechend den
   Locale-Einstellungen',
  ),
  'up' => 
  array (
    0 => 'ref.datetime.php',
    1 => 'Datum/Uhrzeit-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.gmmktime.php',
    1 => 'gmmktime',
  ),
  'next' => 
  array (
    0 => 'function.idate.php',
    1 => 'idate',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/datetime/functions/gmstrftime.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.gmstrftime" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gmstrftime</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">gmstrftime</span> &mdash; <span class="dc-title">Formatiert eine Datums-/Zeitangabe in GMT/UTC-Format entsprechend den
   Locale-Einstellungen</span></p>

 </div>

 <div id="function.gmstrftime-refsynopsisdiv">
  <div class="warning"><strong class="warning">Warnung</strong><p class="simpara">Diese Funktion wurde
in PHP 8.1.0 als <em>DEPRECATED</em> (veraltet) markiert. Es wird dringend davon abgeraten,
sich auf diese Funktion zu verlassen.</p></div>
<p class="para">
 Alternativ können die folgenden Funktionen verwendet werden:
</p>

  <ul class="simplelist">
   <li><span class="function"><a href="function.gmdate.php" class="function">gmdate()</a></span></li>
   <li><span class="methodname"><a href="intldateformatter.format.php" class="methodname">IntlDateFormatter::format()</a></span></li>
  </ul>
 </div>

 <div class="refsect1 description" id="refsect1-function.gmstrftime-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="attribute"><a href="class.deprecated.php">#[\Deprecated]</a> </span><br>
   <span class="methodname"><strong>gmstrftime</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"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Bewirkt das gleiche wie <span class="function"><a href="function.strftime.php" class="function">strftime()</a></span>, mit dem
   Unterschied, dass die Zeit nach Greenwich Mean Time (GMT) zurückgegeben
   wird. Wenn das Skript beispielsweise unter Eastern Standard Time (GMT -0500)
   läuft, gibt die erste Zeile unten &quot;Dec 31 1998 20:00:00&quot; aus, während die
   zweite &quot;Jan 01 1999 01:00:00&quot; ausgibt.
  </p>
  <div class="warning"><strong class="warning">Warnung</strong>
   <p class="para">
    Diese Funktion hängt von den Locale-Informationen des Betriebssystems ab
    und diese sind möglicherweise nicht kompatibel oder gar nicht verfügbar.
    Stattdessen sollte die Methode
    <span class="methodname"><a href="intldateformatter.format.php" class="methodname">IntlDateFormatter::format()</a></span> verwendet werden.
   </p>
  </div>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.gmstrftime-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">format</code></dt>
     <dd>
      <p class="para">
       Siehe die Beschreibung bei <span class="function"><a href="function.strftime.php" class="function">strftime()</a></span>.
      </p>
     </dd>
    
    
<dt><code class="parameter">timestamp</code></dt><dd><p class="para">
Der optionale Parameter <code class="parameter">timestamp</code> ist ein Unix-Zeitstempel
vom Typ <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>. Falls <code class="parameter">timestamp</code> nicht übergeben
wird oder <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> ist, wird die aktuelle lokale Zeit als Standardwert verwendet.
Er entspricht dann also dem Ergebnis der Funktion <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.gmstrftime-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt eine entsprechend der übergebenen Formatzeichenkette formatierte
   Zeichenkette zurück. Die verwendete Zeitangabe wird durch den übergebenen
   <code class="parameter">timestamp</code> oder die aktuelle lokale Zeit festgelegt,
   wenn kein Timestamp angegeben wurde. Monats- und Wochentagsnamen sowie
   andere sprachabhängige Zeichenketten beziehen sich auf die via
   <span class="function"><a href="function.setlocale.php" class="function">setlocale()</a></span> festgelegte aktuelle Locale-Angabe.
   Gibt bei einem Fehler <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurück.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.gmstrftime-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Beschreibung</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.0.0</td>
       <td>
        <code class="parameter">timestamp</code> ist jetzt nullbar.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.gmstrftime-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>gmstrftime()</strong></span>-Beispiel</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />setlocale</span><span style="color: #007700">(</span><span style="color: #0000BB">LC_TIME</span><span style="color: #007700">, </span><span style="color: #DD0000">'en_US'</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%b %d %Y %H:%M:%S"</span><span style="color: #007700">, </span><span style="color: #0000BB">mktime</span><span style="color: #007700">(</span><span style="color: #0000BB">20</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">12</span><span style="color: #007700">, </span><span style="color: #0000BB">31</span><span style="color: #007700">, </span><span style="color: #0000BB">98</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo </span><span style="color: #0000BB">gmstrftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%b %d %Y %H:%M:%S"</span><span style="color: #007700">, </span><span style="color: #0000BB">mktime</span><span style="color: #007700">(</span><span style="color: #0000BB">20</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">12</span><span style="color: #007700">, </span><span style="color: #0000BB">31</span><span style="color: #007700">, </span><span style="color: #0000BB">98</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;</span></span></code></div>
    </div>

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


 <div class="refsect1 seealso" id="refsect1-function.gmstrftime-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <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>
    <li><span class="methodname"><a href="datetime.format.php" class="methodname" rel="rdfs-seeAlso">DateTimeInterface::format()</a> - Liefert das Datum formatiert gem&auml;&szlig; dem angegebenen Format</span></li>
    <li><span class="function"><a href="function.strftime.php" class="function" rel="rdfs-seeAlso">strftime()</a> - Formatiert eine Zeit-/Datumsangabe gem&auml;&szlig; dem Gebietsschema</span></li>
   </ul>
  </p>
 </div>


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