convert String to DateTime

date, parsing, ruby, time

Solution

DateTime.strptime allows you to specify the format and convert a String to a DateTime.

Problem

I need to parse following String into a DateTime Object: `30/Nov/2009:16:29:30 +0100` Is there an easy way to do this? PS: I want to convert the string above as is. The colon after the year is not a typo. I also want to solve the problem with Ruby and not RoR.

Original source