method

rfc822

ruby latest stable - Class: DateTime
rfc822(p1 = v1, p2 = v2)
public

Creates a new DateTime object by parsing from a string according to some typical RFC 2822 formats.

DateTime.rfc2822('Sat, 3 Feb 2001 04:05:06 +0700')
                         #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>