From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/http/headers/date/index.html | 86 ++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 files/zh-cn/web/http/headers/date/index.html (limited to 'files/zh-cn/web/http/headers/date') diff --git a/files/zh-cn/web/http/headers/date/index.html b/files/zh-cn/web/http/headers/date/index.html new file mode 100644 index 0000000000..7160a889e7 --- /dev/null +++ b/files/zh-cn/web/http/headers/date/index.html @@ -0,0 +1,86 @@ +--- +title: Date +slug: Web/HTTP/Headers/Date +tags: + - 日期 + - 格林尼治标准时间 + - 通用首部 + - 首部 +translation_of: Web/HTTP/Headers/Date +--- +
{{HTTPSidebar}}
+ +

Date 是一个通用首部,其中包含了报文创建的日期和时间。

+ + + + + + + + + + + + +
Header type{{Glossary("General header")}}
{{Glossary("Forbidden header name")}}yes
+ +

语法

+ +
Date: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT
+
+ +

指令

+ +
+
<day-name>
+
"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", 或 "Sun" 之一 (区分大小写)。
+
<day>
+
2位数字表示天数,例如, "04" 或 "23"。
+
<month>
+
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" 之一(区分大小写)。
+
<year>
+
4位数字表示年份,例如, "1990" 或 "2016"。
+
<hour>
+
2位数字表示小时数,例如, "09" 或 "23"。
+
<minute>
+
2位数字表示分钟数,例如, "04" 或 "59"。
+
<second>
+
2位数字表示秒数,例如, "04" 或 "59"。
+
GMT
+
+

格林尼治标准时间。 在HTTP协议中,时间都是用格林尼治标准时间来表示的,而不是本地时间。

+
+
+ +

示例

+ +
Date: Wed, 21 Oct 2015 07:28:00 GMT
+
+ +

规范

+ + + + + + + + + + + + +
SpecificationTitle
{{RFC("7231", "Date", "7.1.1.2")}}Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
+ +

浏览器兼容性

+ + + +

{{Compat("http.headers.Date")}}

+ +

相关内容

+ + -- cgit v1.2.3-54-g00ecf