I have a problem generated by rails…
My mysql db saves the dates in this format:
2011-08-05 14:07:24 +0200
This kind of date gets generated by the created_at function:
When I use the Time.now function, the format is:
Fri Aug 05 14:07:24 +0200 2011
Unfortunately those two dates are not compatible for mysql…
Thanks for your help
How do you pass your time variable to the model? If you pass like
Time.nowas aTimeobject then Rails converts the format to the correct SQL format.So do not pass it as a
String