<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >Data e hora</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="Manual do PHP" HREF="index.html"><LINK REL="UP" TITLE="Referência das Funções" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="cyrus_unbind" HREF="function.cyrus-unbind.html"><LINK REL="NEXT" TITLE="checkdate" HREF="function.checkdate.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="reference" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Manual do PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.cyrus-unbind.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.checkdate.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.datetime" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >XXII. Data e hora</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN25201" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="datetime.intro" >Introdução</A ></H1 ><P > Estas funções te permitem conseguir a data e a hora do servidor onde o PHP está rodando. Você pode usar estas funções para formatar a saída de data e hora de muitas maneiras diferentes. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Nota: </B > Por favor mantenha em mente que estas funções dependem das configurações locais do servidor. Considerar especialmente horário-de-verão e anos bissextos quando trabalhar com estas funções. </P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="datetime.required" >Dependências</A ></H1 ><P >Nenhuma biblioteca externa é necessária para compilar esta extensão.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="datetime.installation" >Instalação</A ></H1 ><P >Não há nenhuma instalação necessária para utilizar estas funções, elas fazem parte do núcleo do PHP.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="datetime.runtime" >Configurações em execução</A ></H1 ><P >Esta extensão não define nenhum parâmetro de configuração no <TT CLASS="filename" >php.ini</TT >.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="datetime.resources" >Tipos Resource</A ></H1 ><P >Esta extensão não possui nenhum tipo resource.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="datetime.constants" >Constantes pré-definidas</A ></H1 ><P >Esta extensão não possui nenhuma constante.</P ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Índice</B ></DT ><DT ><A HREF="function.checkdate.html" >checkdate</A > -- Validar uma data Gregoriana</DT ><DT ><A HREF="function.date-create.html" >date_create</A > -- Returns new DateTime object</DT ><DT ><A HREF="function.date-date-set.html" >date_date_set</A > -- Sets the date</DT ><DT ><A HREF="function.date-default-timezone-get.html" >date_default_timezone_get</A > -- Gets the default timezone used by all date/time functions in a script </DT ><DT ><A HREF="function.date-default-timezone-set.html" >date_default_timezone_set</A > -- Sets the default timezone used by all date/time functions in a script </DT ><DT ><A HREF="function.date-format.html" >date_format</A > -- Returns date formatted according to given format</DT ><DT ><A HREF="function.date-isodate-set.html" >date_isodate_set</A > -- Sets the ISO date</DT ><DT ><A HREF="function.date-modify.html" >date_modify</A > -- Alters the timestamp</DT ><DT ><A HREF="function.date-offset-get.html" >date_offset_get</A > -- Returns the daylight saving time offset</DT ><DT ><A HREF="function.date-parse.html" >date_parse</A > -- Returns associative array with detailed info about given date</DT ><DT ><A HREF="function.date-sun-info.html" >date_sun_info</A > -- Returns an array with information about sunset/sunrise and twilight begin/end</DT ><DT ><A HREF="function.date-sunrise.html" >date_sunrise</A > -- Returns time of sunrise for a given day and location</DT ><DT ><A HREF="function.date-sunset.html" >date_sunset</A > -- Returns time of sunset for a given day and location </DT ><DT ><A HREF="function.date-time-set.html" >date_time_set</A > -- Sets the time</DT ><DT ><A HREF="function.date-timezone-get.html" >date_timezone_get</A > -- Return time zone relative to given DateTime</DT ><DT ><A HREF="function.date-timezone-set.html" >date_timezone_set</A > -- Sets the time zone for the DateTime object</DT ><DT ><A HREF="function.date.html" >date</A > -- Formata a data e a hora local</DT ><DT ><A HREF="function.getdate.html" >getdate</A > -- Consegue informações data/hora</DT ><DT ><A HREF="function.gettimeofday.html" >gettimeofday</A > -- Obtém a hora local</DT ><DT ><A HREF="function.gmdate.html" >gmdate</A > -- Formata uma data/hora GMT/CUT</DT ><DT ><A HREF="function.gmmktime.html" >gmmktime</A > -- Obtém um timestamp Unix para uma data GMT</DT ><DT ><A HREF="function.gmstrftime.html" >gmstrftime</A > -- Formata uma hora/data GMT/CUT de acordo com as configurações locais </DT ><DT ><A HREF="function.idate.html" >idate</A > -- Format a local time/date as integer</DT ><DT ><A HREF="function.localtime.html" >localtime</A > -- Obtém a hora local</DT ><DT ><A HREF="function.microtime.html" >microtime</A > -- Retorna um timestamp Unix com microsegundos </DT ><DT ><A HREF="function.mktime.html" >mktime</A > -- Obtém um timestamp Unix para uma data</DT ><DT ><A HREF="function.strftime.html" >strftime</A > -- Formata uma hora/data de acordo com as configurações locais </DT ><DT ><A HREF="function.strptime.html" >strptime</A > -- Parse a time/date generated with <A HREF="function.strftime.html" ><B CLASS="function" >strftime()</B ></A > </DT ><DT ><A HREF="function.strtotime.html" >strtotime</A > -- Analisa qualquer descrição em texto em inglês de data hora em timestamp Unix </DT ><DT ><A HREF="function.time.html" >time</A > -- Retorna o timestamp Unix atual</DT ><DT ><A HREF="function.timezone-abbreviations-list.html" >timezone_abbreviations_list</A > -- Returns associative array containing dst, offset and the timezone name</DT ><DT ><A HREF="function.timezone-identifiers-list.html" >timezone_identifiers_list</A > -- Returns numerically index array with all timezone identifiers</DT ><DT ><A HREF="function.timezone-name-from-abbr.html" >timezone_name_from_abbr</A > -- Returns the timezone name from abbrevation</DT ><DT ><A HREF="function.timezone-name-get.html" >timezone_name_get</A > -- Returns the name of the timezone</DT ><DT ><A HREF="function.timezone-offset-get.html" >timezone_offset_get</A > -- Returns the timezone offset from GMT</DT ><DT ><A HREF="function.timezone-open.html" >timezone_open</A > -- Returns new DateTimeZone object</DT ><DT ><A HREF="function.timezone-transitions-get.html" >timezone_transitions_get</A > -- Returns all transitions for the timezone</DT ></DL ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.cyrus-unbind.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Principal</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.checkdate.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >cyrus_unbind</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >Acima</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >checkdate</TD ></TR ></TABLE ></DIV ></BODY ></HTML >