Oracle iPlanet Web Server 7.0.9 Administrator's Configuration File Reference

Appendix D Using Time Formats

This appendix describes the format strings used for dates and times in the server log. These formats are used by the NSAPI function util_strftime, by some built-in SAFs such as append-trailer, and by server-parsed HTML (parse-html). For more information about server-parsed HTML, see Oracle iPlanet Web Server 7.0.9 NSAPI Developer’s Guide.

The formats are similar to those used by the strftime C library routine, but not identical. For more information on the NSAPI function, util_strftime, see util_strftime Function in Oracle iPlanet Web Server 7.0.9 NSAPI Developer’s Guide.

Format Strings

The following table describes the format strings for dates and times.

Table D–1 Format Strings for Date and Time

Attribute 

Allowed Values 

%a 

Abbreviated day of the week (3 chars)

%d 

Day of month as decimal number (01-31)

%S 

Second as decimal number (00-59) 

%M 

Minute as decimal number (00-59) 

%H 

Hour in 24-hour format (00-23) 

%Y 

Year with century, as decimal number, up to 2099 

%b 

Abbreviated month name (3 chars)

%h 

Abbreviated month name (3 chars)  

%T 

Time in "HH:MM:SS" format 

 

%X 

Time in "HH:MM:SS" format 

 

%A 

Day of the week, full name 

%B 

Month, full name 

%C 

"%a %b %e %H:%M:%S %Y"  

%c 

Date and time in "%m/%d/%y %H:%M:%S" format 

%D 

Date in "%m/%d/%y" format 

%e 

Day of month as decimal number (1-31) without leading zeros 

%I 

Hour in 12-hour format (01-12) 

%j 

Day of year as decimal number (001-366) 

%k 

Hour in 24-hour format (0-23) without leading zeros 

%l 

Hour in 12-hour format (1-12) without leading zeros 

%m 

Month as decimal number (01-12) 

%n 

Line feed 

%p 

a.m./p.m. indicator for 12-hour clock 

%R 

Time in "%H:%M" format 

%r 

Time in "%I:%M:%S %p" format 

%t 

Tab 

%U 

Week of year as decimal number, with Sunday as first day of week (00-51) 

%w 

Weekday as decimal number (0-6; Sunday is 0) 

%W 

Week of year as decimal number, with Monday as first day of week (00-51) 

%x 

Date in "%m/%d/%y" format 

%y 

Year without century, as decimal number (00-99) 

%% 

Percent sign