*HTTP 仕様での定義 **RFC 1945 (HTTP/1.0) 第3.3節 Date/Time Formats / 日時形式 **RFC 2068, 2616 (HTTP/1.1) 第3.3.1節 Full Date / 完全な日付 HTTP[/*1945*1.0] applications have historically allowed three different formats for the representation of date/time stamps: HTTP[/*1945*1.0] 応用は歴史的に日時を表す3つの書式を認めています。 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 (an update to RFC 822). The second format is in common use, but is based on the obsolete RFC 850 date format and lacks a four-digit year. HTTP/[*1945*1.0|1.1] clients and servers that parse the date value [*1945*should|MUST] accept all three formats [*2068*(for compatibility with HTTP/1.0)], [*1945*though they must never generate the third (asctime) format.|though they MUST only generate the RFC 1123 format for representing HTTP-date values in header fields.] 最初の書式は Internet 標準で好ましいものであり、 RFC 1123 (RFC 822 の更新) で定義されるものの固定長部分集合です。 2番目の書式は広く使われていますが、廃止されている RFC 850 日付形式 で4桁の年号を表せません。日付値を解析する HTTP/[*1945*1.0|1.1] クライアント 及びサーバーは[*2068*(HTTP/1.0 との互換性のため)]これら3つ全ての日付形式を 受け付け[*1945*るべきです|''なければなりません'']が、 [*1945*3つ目の asctime 形式は生成してはなりません。|頭領域内の HTTP-date の値表現としては RFC 1123 形式のみを生成し''なければなりません''。] Note: Recipients of date values are encouraged to 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 proxies/gateways to SMTP or NNTP. 註: 日付値の受信者は非 HTTP 応用が生成したであろう日付値も 受け入れられるように柔軟であることを推奨します。記事を SMTP や NNTP のプロキシや関門から記事を受け取ったり 投稿したりすることもあるからです。 All HTTP[*1945*/1.0] date/time stamps [*1945*must|MUST] be represented in [Universal Time (UT), also known as] Greenwich Mean Time (GMT), without exception. [*2616*For the purposes of HTTP, GMT is exactly equal to UTC (Coordinated Universal Time). ] This is indicated in the first two formats by the inclusion of "GMT" as the three-letter abbreviation for time zone, and [*1945*should|MUST] be assumed when reading the asctime format. [*2616*HTTP-date is case sensitive and MUST NOT include additional LWS beyond that specifically included as SP in the grammar.] 全ての HTTP[*1945*/1.0] 日時印は例外無く [国際協定時 (UT) (]グリニッジ標準時 (GMT) [としても知られています。)] で表されてい[*1945*る必要があります|''なければなりません'']。 [*2616*HTTP用途では、 GMT は UTC (協定国際時) と同じ物です。] これは「GMT」を時間帯の3文字略称として含めている最初の2つの書式 についてであり、 asctime 形式を読む時はそう仮定[*1945*すべきです| ''しなければなりません'']。[*2616*HTTP-date では大文字・小文字の区別は 無く、文法で SP が入ると示した場所以外で LWS を含めては''なりません''。] 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" Note: HTTP 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. 註: HTTP は日時印形式をプロトコル列中での使用についてのみ 要求しています。クライアント及びサーバーは利用者への上演や 要求の記録などでこれらの形式を使う必要はありません。 *説明 HTTP が日付に認めている形式の内、 RFC 822 (RFC 1123 で改訂) 形式 はその部分集合で、 RFC 822 が認めていた要素間の linear-white-space を 必要な部分のみ SP と厳格にし、数字の桁数を揃え、 時間帯については GMT のみ認めるとしています。 RFC 850 形式とされているものは、 RFC 850 によると ARPANET の日付形式であり、 (RFC 850 の他の部分から推察すると) [[RFC822の日付形式]]と したいところですが、 RFC 822 の形式とはやや異なり、その前の版である [[RFC733の日付形式]]に一致することが分かります。 しかし、 RFC 733 は年号を4桁でも良いとしていますから、その点で矛盾します。 RFC 2069 『An Extension to HTTP : Digest Access Authentication』 は RFC 1123 形式のみを認めています。 Netscape の原 cookie 提案では expires 属性で使われる日付形式を RFC 850 形式としています。 (RFC 2109 参照) RFC 2518 WebDAV では上記の HTTP-Date と [[ISO8601の日付形式]] を使い分けています。 *SEE ALSO -RFC 1945 HTTP/1.0 -RFC 2068 HTTP/1.1 -[[日付形式]] -[[RFC822の日付形式]] (RFC 1123 で改訂) -[[RFC850の日付形式]] -[[RFC1036の日付形式]] -[[asctime形式]] -[[ISO8601の日付形式]] *LICENSE See [[RFCのライセンス]] - [1] 古い HTTP/1.0 サーバーの形式(の1つ): [SAMP[Tue Nov 23 16:00:43 1993 GMT]] - [2] >>1 [[C]] の関数で返される形式ですかな。