Time formats for HTTP Server
This topic provides information about time formats for server-side includes for the IBM® HTTP Server for i Web server.
The following table contains formatting values used to specify time with server-side includes. See Log formats for HTTP Server and Server-side include commands for HTTP Server for proper use of the server-side include time format.
Value | Description | Example |
---|---|---|
%% |
Replace with %. | % |
%a |
Replace with the abbreviated weekday name. | Mon |
%A |
Replace with the full weekday name. | Monday |
%b |
Replace with the abbreviated month name. | Apr |
%B |
Replace with the full month name. | April |
%c |
Replace with the date and time. | |
%C |
Replace with the century number (year divided by 100 and truncated). | |
%d |
Replace with the day of the month (01-31). | 20 |
%D |
Insert the date as %m/%d/%y. | 04/20/00 |
%e |
Insert the month of the year as a decimal number (01-12) | 03 |
%E[cCzyY] |
If the alternative date and time format is not available, the %E descriptions are mapped to their unextended counterparts. For example %E is mapped to %C. | |
%Ec |
Replace with the alternative data and time representation. | |
%EC |
Replace with the name of the base year in the alternative representation. | |
%Ex |
Replace with the alternative data representation. | |
%EX |
Replace with the alternative time representation. | |
%Ey |
Replace with the offset from %EC (year only) in the alternative representation. | |
%EY |
Replace with the full alternative year representation. | |
%h |
Replace with the abbreviated month name. This is the same as %b. | Apr |
%H |
Replace with the hour (23-hour clock) as a decimal number (00-23). | 22 |
%I |
Replace with the hour (12-hour clock) as a decimal number(00-12). | 04 |
%j |
Replace with the day of the year (001-366). | 222 |
%m |
Replace with the month (01-12). | 04 |
%M |
Replace with the minute (00-59). | 24 |
%n |
Replace with a new line. | |
%O[deHlmMSUwWy] |
If the alternative date and time format is not available the %E descriptors are mapped to their extended counterparts. For example %Od is mapped to %d. | |
%Od |
Replace with the day of the month using the alternative numeric symbols. Fill as needed with leading zeros if there is any alternative symbol for zero otherwise with leading spaces. | |
%Oe |
Replace with the day of the month using the alternative numeric symbols filled as needed with leading spaces. | |
%OH |
Replace with the hour (24 hour clock) using the alternative numeric symbols. | |
%OI |
Replace with the hour (12 hour clock) using the alternative numeric symbols. | |
%Om |
Replace with the month using the alternative numeric symbols. | |
%OM |
Replace with the minutes using the alternative numeric symbols. | |
%OS |
Replace with the seconds using the alternative numeric symbols. | |
%OU |
Replace with the week number of the year (Sunday as the first day of the week, rules corresponding to %U) using alternative numeric symbols. | |
%Ow |
Replace with the weekday (Sunday=0) using the alternative numeric symbols. | |
%OW |
Replace with the week number of the year (Monday as the first day of the week) using the alternative numeric symbols. | |
%Oy |
Replace with the year (offset from %C) in the alternative representation and using the alternative numeric symbols. | |
%p |
Replace with the local equivalent of AM or PM. | |
%r |
Replace with the string equivalent to %I:%M:%S %p. | |
%R |
Replace with the time in 24 hour notation (%H:%M). | |
%S |
Replace with seconds (00-61). | |
%t |
Replace with a tab. | |
%T |
Replace with a string equivalent to %H:%M:%S. | 16:31:04 |
%u |
Replace with a weekday as a decimal number (1 to 7) with a 1 representing Monday. | 3 |
%U |
Replace with the week number of the year (00-53) where Sunday is the first day of the week. | 24 |
%V |
Replace with the week number of the year (01-53) where Monday is the first day of the week. | 5 |
%w |
Replace with the weekday (0-6) where Sunday is 0. | 0 |
%W |
Replace with the week number of the year (00-53) where Monday is the first day of the week. | 13 |
%x |
Replace with the appropriate date representation. | |
%X |
Replace with the appropriate time representation. | |
%y |
Replace with the year with the century. | 02 |
%Y |
Replace with the year with the current century. | 2002 |