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dHRpQGdtYWlsLmNvbQpTaXRlOiBodHRwOi8vd3d3LmZyZWVk
b21jb2Rlci5jb20uYXIK
 
J

Joel VanderWerf

Matias said:
While working on a project I came across with a problem that I traced to
Time.rb. Some rss feeds return time in the following format "Mon, 28 Jul
2008 5:56 pm PDT". Searching inside time.rb code I was not able to find any
rfc capable of parsing that string. Is there any rfc which manages this
type of time format which contains AM/PM ? (rfc2822 does not) if there is
and it is not yet implemented I would more than glad to code it, it is just
that I do not know I should just monkey patch the class to make this work or
if I could implement an existent rfc that will solve the issue, and truly I
would rather do the last, "mucho" more interesting. :D

Doesn't this work?

$ ruby -r time -e 'puts Time.parse "Mon, 28 Jul 2008 5:56 pm PDT"'
Mon Jul 28 17:56:00 -0700 2008
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,662
Latest member
sxarexu

Latest Threads

Top