# ctime

< c‎ | chrono

C
 Linguagem Digite apoio Gerenciamento de memória dinâmica De tratamento de erros Utilidades do programa Utilitários de data e hora Biblioteca cordas Algoritmos Numéricos Entrada / saída de apoio Suporte de localização Apoio discussão (C11) Operações atômicas (C11)

Utilitários de data e hora
Funções
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Manipulação do tempo
Original:
Time manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 difftime
 time
 clock
Conversões de formato
Original:
Format conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 asctime
 ctime
 strftime
 wcsftime
 gmtime
 localtime
 mktime
Constantes
Original:
Constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 CLOCKS_PER_SEC
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 tm
 time_t
 clock_t

 Definido no cabeçalho char* ctime( const time_t* time );
Converte dado tempo desde época a um tempo do calendário local e, em seguida, para uma representação textual, como se chamando . A seqüência resultante tem o seguinte formato:
Original:
Converts given time since epoch to a calendar local time and then to a textual representation, as if by calling . The resulting string has the following format:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
`Www Mmm dd hh:mm:ss yyyy`
• `Www` - o dia da semana (um dos `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`, `Sun`).
Original:
`Www` - the day of the week (one of `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`, `Sun`).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
• `Mmm` - o mês (um dos `Jan`, `Feb`, `Mar`, `Apr`, `May`, `Jun`, `Jul`, `Aug`, `Sep`, `Oct`, `Nov`, `Dec`).
Original:
`Mmm` - the month (one of `Jan`, `Feb`, `Mar`, `Apr`, `May`, `Jun`, `Jul`, `Aug`, `Sep`, `Oct`, `Nov`, `Dec`).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
• `dd` - o dia do mês
Original:
`dd` - the day of the month
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
• `hh` - horas
Original:
`hh` - hours
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
• `mm` - minutos
Original:
`mm` - minutes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
• `ss` - segundos
Original:
`ss` - seconds
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
• `yyyy` - anos
Original:
`yyyy` - years
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A função não suporta localização.
Original:
The function does not support localization.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

## Índice

### [editar]Parâmetros

 time - ponteiro para um objeto time_t especificando o tempo para imprimirOriginal: pointer to a time_t object specifying the time to printThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.

### [editar]Valor de retorno

ponteiro para uma cadeia de caracteres estática terminada em nulo segurando a representação textual de data e hora. A seqüência pode ser compartilhado entre `asctime` e ctime, e pode ser substituído em cada invocação de qualquer dessas funções.
Original:
pointer to a static null-terminated character string holding the textual representation of date and time. The string may be shared between `asctime` and ctime, and may be overwritten on each invocation of any of those functions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

### [editar]Notas

Esta função retorna um ponteiro para dados estáticos e não é thread-safe. Além disso, ele modifica o objeto tm estático que pode ser partilhado com gmtime e localtime. POSIX marca esta função obsoleta e recomenda strftime vez.
Original:
This function returns a pointer to static data and is not thread-safe. In addition, it modifies the static tm object which may be shared with gmtime and localtime. POSIX marks this function obsolete and recommends strftime instead.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
O comportamento pode ser indefinido para os valores de time_t que resultam na seqüência de mais de 25 caracteres (por exemplo, 10 mil anos)
Original:
The behavior may be undefined for the values of time_t that result in the string longer than 25 characters (e.g. year 10000)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

### [editar]Veja também

 asctime converte um objeto `time_t` a uma representação textualOriginal: converts a `time_t` object to a textual representationThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função)  strftime converte um objeto `tm` a representação textual personalizadoOriginal: converts a `tm` object to custom textual representationThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função)  C++ documentation for ctime