title: Rails: seeding database data and date formats
body: <p>I'm trying to seed some data into a Rails 3 app that I'm developing, using the db/seed.rb file and the rake db:seed command.</p>
  
  <p>The data I'm seeding involves a database table called Meeting that has three columns: string title, datetime startDate, datetime endDate. The datetimes I'm trying to insert are in "mm/dd/yyyy hh:mm" format -- eg. "01/02/2003 13:23" = January 2, 2003 1:23 PM. However, the DateTime.parse() is consistently erroring out with an "invalid date" error -- as it tries to parse the dates in "dd/mm/yyyy" format.</p>
  
  <p>From my Googling, I've been led to believe that when parsing DateTime objects the compiler looks at the string that's passed in and does some hasty pattern matching and then maps "mm/dd/yyyy" and "dd-mm-yyyy" accordingly per American/British(etc) standards based on whether a slash or a dash was used as a seperator. This doesn't seem to be the case, however, and I'm wondering why. And how to fix it.</p>
  
  <p>This is how I'm seeding the Meetings -- the first one parses properly, the second one fails.</p>
  
  <pre><code>Meeting.create([
    {
      :title =&gt; "This meeting parses fine",
      :startDate =&gt; DateTime.parse("09/01/2009 17:00"),
      :endDate =&gt; DateTime.parse("09/01/2009 19:00")
    },
    {
      :title =&gt; "This meeting errors out",
      :startDate =&gt; DateTime.parse("09/14/2009 8:00")
      :endDate =&gt; DateTime.parse("09/14/2009 9:00")
    }])
  </code></pre>