method

httpdate

httpdate()
public

Returns a string of the object’s date and time in the format used by HTTP requests.

Time.zone.now.httpdate  # => "Tue, 01 Jan 2013 04:39:43 GMT"

1Note

converts a Time object to a string in rfc822 / rfc2822 format

edavey · Aug 10, 20084 thanks
 >> time =  p.updated_at 
 => Fri Jun 20 14:05:30 +0100 2008
 >> time.class
 => Time
 >> time.httpdate
 => "Fri, 20 Jun 2008 13:05:30 GMT"

.