RFC 2822 Internet Message Format

Source: http://tools.ietf.org/html/rfc2822

RFC 2822 is a internet standard, which specifies a syntax for text messages that are sent between computers.

The copyright of this standard is the Internet Society (ISOC), The ISOC is a global cause-driven organization that is dedicated to ensuring that the internet stays open, transparent and defined. ISOC is the world’s trusted independent source of leadership for Internet Policy, Technology Standards, and future development.

The standard source is from IETF site. IETF (The Internet Engineering Task Force) is an organized activity of the ISOC. The mission of the IETF is to make the Internet work better by producing high quality, relevant technical documents that influence that they way people design, use and manage the Internet.

In our new API specification, we need mark date and time in several header fields, which is following the syntax defined in RFC 2822, like below:

date-time       =       [ day-of-week "," ] date FWS time [CFWS]

day-of-week     =       ([FWS] day-name) / obs-day-of-week

day-name        =       "Mon" / "Tue" / "Wed" / "Thu" /
                        "Fri" / "Sat" / "Sun"

date            =       day month year

year            =       4*DIGIT / obs-year

month           =       (FWS month-name FWS) / obs-month

month-name      =       "Jan" / "Feb" / "Mar" / "Apr" /
                        "May" / "Jun" / "Jul" / "Aug" /
                        "Sep" / "Oct" / "Nov" / "Dec"

day             =       ([FWS] 1*2DIGIT) / obs-day

time            =       time-of-day FWS zone

time-of-day     =       hour ":" minute [ ":" second ]

hour            =       2DIGIT / obs-hour

minute          =       2DIGIT / obs-minute

second          =       2DIGIT / obs-second

zone            =       (( "+" / "-" ) 4DIGIT) / obs-zone

In the obsolete time zone, "UT" and "GMT" are indications of
"Universal Time" and "Greenwich Mean Time" respectively and are both
semantically identical to "+0000".
Advertisements

About qianggan

Sr. Software Engineer
This entry was posted in Computers and Internet. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s