[Next] [Previous] [Up] [Top] [Full Contents] [Search]

3. Protocol Parameters

3.3 Date/Time Formats

3.3.1 Full Date

HTTP/1.0 applications have historically allowed three different formats for the representation of date/time stamps:

Sun, 06 Nov 1994 08:49:37 GMT	; RFC 822, updated by RFC 1123
Sunday, 06-Nov-94 08:49:37 GMT	; RFC 850, obsoleted by RFC 1036
Sun Nov  6 08:49:37 1994	; ANSI C's asctime() format
The first format is preferred as an Internet standard and represents a fixed-length subset of that defined by RFC 1123 [7] (an update to RFC 822 [8]). The second format is in common use, but is based on the obsolete RFC 850 [11] date format and lacks a four-digit year. HTTP/1.0 clients and servers must accept all three formats, though they should never generate the third (asctime) format. Future clients and servers must only generate the RFC 1123 format for representing date/time stamps in HTTP/1.0 requests and responses.

All HTTP/1.0 date/time stamps must be represented in Universal Time (UT), also known as Greenwich Mean Time (GMT), without exception. This is indicated in the first two formats by the inclusion of "GMT" as the three-letter abbreviation for time zone, and should be assumed when reading the asctime format.

HTTP-date	=	rfc1123-date | rfc850-date | asctime-date
rfc1123-date	=	wkday "," SP date1 SP time SP "GMT"
rfc850-date	=	weekday "," SP date2 SP time SP "GMT"
asctime-date	= wkday SP date3 SP time SP 4DIGIT
date1	=	2DIGIT SP month SP 4DIGIT
		; day month year (e.g. 02 Jun 1982)
date2	=	2DIGIT "-" month "-" 2DIGIT
		; day-month-year (e.g. 02-Jun-82)
date3	=	month SP ( 2DIGIT | ( SP 1DIGIT ))
		; month day (e.g. Jun  2)
time	=	2DIGIT ":" 2DIGIT ":" 2DIGIT
		; 00:00:00 - 23:59:59
wkday	=	"Mon" | "Tue" | "Wed"
	|	"Thu" | "Fri" | "Sat" | "Sun"
weekday	=	"Monday" | "Tuesday" | "Wednesday"
	|	"Thursday" | "Friday" | "Saturday" | "Sunday"
month	=	"Jan" | "Feb" | "Mar" | "Apr"
	|	"May" | "Jun" | "Jul" | "Aug"
	|	"Sep" | "Oct" | "Nov" | "Dec"
Comments and/or extra LWS are not permitted inside an HTTP-date value generated by a conformant application. However, recipients of date values should be robust in accepting date values that may have been generated by non-HTTP applications (as is sometimes the case when retrieving or posting messages via gateways to SMTP or NNTP).

Note
HTTP/1.0 requirements for the date/time stamp format apply only to their usage within the protocol stream. Clients and servers are not required to use these formats for user presentation, request logging, etc.

3.3.2 Delta Seconds

Some HTTP header fields allow a time value to be specified as an integer number of seconds (represented in decimal) after the time that the message was received. This format should only be used to represent short time periods or periods that cannot start until receipt of the message.

delta-seconds	=	1*DIGIT

T. Berners-Lee, R. T. Fielding, H. Frystyk Nielsen - 12 MAR 95

[Next] [Previous] [Up] [Top] [Full Contents] [Search]

Generated with CERN WebMaker