Difference between revisions of "cpp/chrono/c/ctime"
From cppreference.com
Line 42: | Line 42: | ||
{{dcl list begin}} | {{dcl list begin}} | ||
{{dcl list template | cpp/chrono/c/dcl list asctime}} | {{dcl list template | cpp/chrono/c/dcl list asctime}} | ||
+ | {{dcl list template | cpp/chrono/c/dcl list strftime}} | ||
{{dcl list end}} | {{dcl list end}} |
Revision as of 14:25, 14 June 2011
Defined in header <ctime>
|
||
char *ctime( const time_t *time ); |
||
Converts given time since epoch to a calendar local time and then to a textual representation. The resulting string has the following format:
Www Mmm dd hh:mm:ss yyyy
Www
- the day of the week (one ofMon
,Tue
,Wed
,Thu
,Fri
,Sat
,Sun
).Mmm
- the month (one ofJan
,Feb
,Mar
,Apr
,May
,Jun
,Jul
,Aug
,Sep
,Oct
,Nov
,Dec
).dd
- the day of the monthhh
- hoursmm
- minutesss
- secondsyyyy
- years
The function does not support localization.
time | - | pointer to a time_t object specifying the time to print
|
pointer to a static character string. The string is shared among ctime()
and asctime()
and is overwritten on each invocation.
This section is incomplete Reason: no example |