#
#
#end
The Silicon Guide To
Using Server Side Includes
The Config Command
To configure the how the date commands display their information
(DATE_GMT, DATE_LOCAL and LAST_MODIFIED), use the CONFIG command. The syntax for
this command is:
<!--#config timefmt="FORMATTING_GOES_HERE" -->,
where FORMATTING_GOES_HERE is any combination of the following formatting
codes:
Formatting Code |
Description |
Real-time Example |
%a |
Short weekday name |
Thu |
%A |
Full weekday name |
Thursday |
%b |
Short month name |
Dec |
%B |
Full month name |
December |
%c |
Proper way of formatting the time in the time zone where the server is
located. |
Thu Dec 5 02:15:33 2024 |
%C |
Default time format |
20 |
%d |
Day of the month |
05 |
%D |
Current date in the standard format of mm/dd/yy |
12/05/24 |
%e |
Day of the month, without any zeroes. |
5 |
%h |
Same as %b |
Dec |
%H |
Current hour in 24 hour format |
02 |
%I |
Current hour in 12 hour format |
02 |
%j |
Day of year |
340 |
%m |
Month of year |
12 |
%M |
Current minute |
15 |
%n |
Break line |
|
%p |
Indicates whether it is AM or PM |
AM |
%r |
Time in the format of 2:13:35 PM |
02:15:33 AM |
%R |
Time as 16:34 |
02:15 |
%S |
Current second |
33 |
%t |
Tabulation |
|
%T |
Time in the format of 14:23:54 |
02:15:33 |
%U |
Number of the current week |
48 |
%w |
Current week day |
4 |
%W |
Same as %U |
49 |
%x |
Date format of Local Country |
12/05/24 |
%X |
Time format of Local Country |
02:15:33 |
%y |
Year in two digit format |
24 |
%Y |
Year in four digit format |
2024 |
%Z |
The name of the Local Time Zone |
UTC |
For example if I wanted to display the current time in the format Month dd, YYYY; I
would insert the following code into my HTML document:
<!--#config timefmt="%B %d, %Y"-->
<!--#echo var="DATE_LOCAL"-->
which would yield the following output:
December 05, 2024
Next Page:
Including files
Skip Ahead:
Executing CGI Scripts
SSI Hosting and Conclusion