Files
archived-doc-pt-br/reference/datetime/functions/gmdate.xml
Leonardo Lara Rodrigues 909023c945 Minor corrections to pull request #341 and initial translation of features/gc and features/dtrace (#343)
* Minor corrections to pull request #341

* Initial translation of features/gc and features/dtrace

* Update to language-snippets.ent

* Update to language/errors.xml

* Updates to language/predefined/attributes/*

* Updates to outdated language/predefined/variables/*

* Update to outdated files in install/windows/

* New translation of missing file security/sessions.xml

* New translation of missing files in language/context

* Update datetime.xml

* New translation of missing files in datetime/

---------

Co-authored-by: LEONARDO LARA RODRIGUES <leonardolara@github.com>
2023-11-13 14:14:06 -03:00

129 lines
3.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 5c951013ca04161992efed8b86fb40f55669958e Maintainer: lhsazevedo Status: ready --><!-- CREDITS: felipe, surfmax, fabioluciano, lhsazevedo -->
<refentry xml:id="function.gmdate" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>gmdate</refname>
<refpurpose>Formata uma data/hora GMT/CUT</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>gmdate</methodname>
<methodparam><type>string</type><parameter>format</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>timestamp</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Idêntica à função <function>date</function>, exceto que
a hora retornada será baseada no Horário de Greenwich (GMT).
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>format</parameter></term>
<listitem>
<para>
O formato da saída da <type>string</type> da data. Veja as opções
de formatação para a função <function>date</function>.
</para>
</listitem>
</varlistentry>
&date.timestamp.description;
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Retorna uma string da data formatada.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>timestamp</parameter> agora é anulável.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Exemplo da <function>gmdate</function></title>
<para>
Quando executado na Finlândia (GMT +0200), a primeira linha abaixo imprime
"Jan 01 1998 00:00:00", enquando a segunda imprime "Dec 31 1997 22:00:00".
</para>
<programlisting role="php">
<![CDATA[
<?php
echo date("M d Y H:i:s", mktime(0, 0, 0, 1, 1, 1998));
echo gmdate("M d Y H:i:s", mktime(0, 0, 0, 1, 1, 1998));
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>DateTimeImmutable::__construct</methodname></member>
<member><methodname>DateTimeInterface::format</methodname></member>
<member><function>date</function></member>
<member><function>mktime</function></member>
<member><function>gmmktime</function></member>
<member><methodname>IntlDateFormatter::format</methodname></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->