Formatting DateTime with DataMapper and SQLite

Im having some problem with formatting a date from Time.now and storing
it in a SQLite database using DataMapper. I have this code:

t = Time.now
Post.create(content: params[:content], number: 1, created_at:
t.strftime(’%Y-%m-%d %H:%M’), forumthread: theThread, user:
$loggedInUser)

The code at the created_at column is supposed to return a nicely
formatted date “year-month-day hour-minute” and it return exactly that
when I test it in irb. But when I look in my database it looks like
this:

2012-03-19T13:09:00+00:00

It looks exactly the same as when I use Time.now without .strftime which
is supposed to format it, why?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs