std::asctime

From Cppreference

< cpp | chrono | c
Jump to: navigation, search
Defined in header <ctime>

char *asctime( const struct tm *time_ptr );

Converts given calendar time tm to a textual representation. The resulting string has the following format:

Www Mmm dd hh:mm:ss yyyy

The function does not support localization.

Contents

[edit] Parameters

time_ptr - pointer to a tm object specifying the time to print

[edit] Return value

pointer to a static character string. The string is shared among ctime() and asctime() and is overwritten on each invocation.

[edit] Example

[edit] See also

ctime
converts a tm object to a textual representation
(function)
strftime
converts a tm object to custom textual representation
(function)