Appendix C. strftime() Time Formats
strftime() is a standard C library function that formats date and time values according to a format defined in a specification string; it is composed of literal text interspersed with the conversion specifiers defined in Table C-1. These format specifiers are used in log format strings and SSI configuration options, as well as to define log file templates for the rotatelogs and cronolog log file rotation programs.
Spec | Description |
| Abbreviated name of the day of the week |
| Full name of the day of the week |
| Abbreviated month name according to the current locale |
| Full month name according to the current locale |
| Preferred date and time representation for the current locale |
| Two-digit day of the month (01–31) |
| Two-digit hour using the 24-hour clock (01–23) |
| Two-digit hour using the 12-hour clock (01–12) |
| Three-digit day of the year (001–366) |
| Two-digit minutes part of the time (00–59) |
| Two-digit month number (01–12) |
| Current locale’s AM/PM indicator |
| Seconds part of the time (00–61, to allow for leap seconds) |
| Two-digit week number (00–53, where weeks start on a Sunday and week 1 is the first full week of the year) |
| Two-digit week number (00–53, where weeks start on a Monday and week 1 is the first full week of the year) |
| Day of the week (0–6, where 0 represents Sunday) |
| Preferred time representation for the current locale (without the date) |
| Preferred date representation for the current locale (without the time) ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access