`
wuhua
  • 浏览: 2095316 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

Date/Time Formats

    博客分类:
  • HTTP
SUN 
阅读更多

3.3 Date/Time Formats
3.3.1 Full Date

HTTP 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 [8] (an update to RFC 822 [9]). The second format is in common use, but is based on the obsolete RFC 850 [12] date format and lacks a four-digit year. HTTP/1.1 clients and servers that parse the date value MUST accept all three formats (for compatibility with HTTP/1.0), though they MUST only generate the RFC 1123 format for representing HTTP-date values in header fields. See section 19.3 for further information.
      Note: Recipients of date values are encouraged to be robust in
      accepting date values that may have been sent by non-HTTP
      applications, as is sometimes the case when retrieving or posting
      messages via proxies/gateways to SMTP or NNTP.

All HTTP date/time stamps MUST be represented in Greenwich Mean Time (GMT), without exception. 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 MUST be assumed when reading the asctime format. HTTP-date is case sensitive and MUST NOT include additional LWS beyond that specifically included as SP in the grammar.
       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.

分享到:
评论

相关推荐

    Http1.1超文本传输协议中文版

    3.3 日期/时间格式(Date/Time Formats) 20 3.3.1完整日期 (Full Date) 20 3.3.2 Delta Seconds 22 3.4 字符集 22 3.4.1丢失的字符集(Missing Charset) 22 3.5 内容编码(Content Codings) 23 3.6 传输编码 ...

    HTTP协议详解

    3.3 日期/时间格式(Date/Time Formats) 3.3.1完整日期 (Full Date) 3.3.2 Delta Seconds 3.4 字符集 3.4.1丢失的字符集(Missing Charset) 3.5 内容编码(Content Codings) 3.6 传输编码 (Transfer Codings)...

    http RFC文件

    3.3 Date/Time Formats ...........................................20 3.3.1 Full Date ................................................20 3.3.2 Delta Seconds .............................................

    JIRA 从入门到精通.doc

    Global Settings—>Look and Feel,设置系统的Logo,Colours以及Date/Time Formats. 7、 邮件服务设置: Global Settings—>Mail Servers,进入邮件服务设置页面,如图: 点击图中的“编辑”可以更改邮件服务器地址...

    NaturalDateFormat,.zip

    按照材料设计指南(https://www.google.com/design/spec/patterns/data formats.html data formats date time)中的说明格式化日期的库。

    daily-change:减少碳足迹计算器-Rails CRUD早期项目

    试试这个时间戳(推荐用于Rails(在application.html.erb中):config / initializers / time_formats.rb Date :: DATE_FORMATS [:stamp] =“%Y%m%d”#YYYYMMDD Time :: DATE_FORMATS [:stamp] ] =“%Y%m%...

    Mysql 日期时间 DATE_FORMAT(date,format)

    Formats the date value according to the format string. The following specifiers may be used in the format string. As of MySQL 3.23, the “%” character is required before format spe

    EMS.Advanced.Data.Export.VCL.v4.9.0.1.Full.Source

    Added the possibility to append date/time to the exported file name. The AppendDateTimeToFileName and AppendDateTimeToDatabaseName (TADO_QExport4Access) properties. Use the ExportedFileName and ...

    Datastage Parallel Job Functions.doc

    timetostring(time, stringformat)) need specific formats. For a date, the format components are: • %dd two digit day • %mm two digit month • %yy two digit year (from 1900) • %year_...

    DateTime-Format-ISO8601:解析ISO8601格式

    # This format is ambiguous and could be either a date or time, so use the# parse_time method.my $time_str = '113231';$dt = DateTime::Format::ISO8601->parse_time($time_str);say $dt;# ormy

    Ruby Cookbook: Recipes for Object-Oriented Scripting

    Data structures including strings, numbers, date and time, arrays, hashes, files and directories Using Ruby’s code blocks, also known as closures OOP features such as classes, methods, objects, ...

    SAS_online_tutorial_for_base_exam

    Reading Date and Time Values Creating a Single Observation from Multiple Records Creating Multiple Observations from a Single Record Reading Hierarchical Files Reading Variable-Length Records

    sas9.2 sid破解

    *PRODNUM208 = PCFILE SAS/ACCESS PC File Formats; *PRODNUM209 = ODBC SAS/ACCESS ODBC; *PRODNUM215 = OLEDB SAS/ACCESS TO OLE DB; *PRODNUM535 = STATSTUDIO SAS/IML Studio; *PRODNUM538 = WKSPSRVLOCAL ...

    php使用strtotime和date函数判断日期是否有效代码分享

    咋一想,判断日期是否有效应该是蛮简单的一个功能,但是细想...复制代码 代码如下:/** * 校验日期格式是否正确 * * @param string $date 日期 * @param string $formats 需要检验的格式数组 * @return boolean */

    ZendFramework中文文档

    9.6.4. Self-defined OUTPUT formats using PHP's date() format specifiers 9.7. Working examples 9.7.1. Checking dates 9.7.2. Sunrise and Sunset 9.7.3. Timezones 10. Zend_Db 10.1. Zend_Db_Adapter ...

    Clean.Data.1785284010

    Publication Date: 2015-05-29 ISBN-10: 1785284010 ISBN-13: 9781785284014 Save time by discovering effortless strategies for cleaning, organizing, and manipulating your data About This Book Grow your ...

    易导出

    Supports inclusion and exclusion of files by wildcard mask as well as by exact file name · Has its own scheduler supporting unattended auto-Export and scheduling of any specific time or date,...

    Python for Data Analysis 【2017 第二版】

    Publication Date: 2017-09-25 ISBN-10: 1491957662 ISBN-13: 9781491957660 Table of Contents Chapter 1 Preliminaries Chapter 2 Python Language Basics, IPython, and Jupyter Notebooks Chapter 3 Built-in ...

    Hadoop.in.Practice.2nd.Edition

    Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the Book It's always a good time to upgrade your Hadoop skills! Hadoop in Practice,...

Global site tag (gtag.js) - Google Analytics