Home > Life at work > Ruby and Time.now.httpdate

Ruby and Time.now.httpdate

January 26th, 2010

I keep running into this when I need a httpdate.  Make sure to always require ‘time’

e.g.

Time.now.httpdate -> raises exception

and

require ‘time’

Time.now.httpdate ->Tue, 26 Jan 2010 22:10:45 GMT

Life at work

  1. No comments yet.
  1. No trackbacks yet.
CommentLuv Enabled

Comments links could be nofollow free.