Why is Rails displaying date like:
Sat Jan 01 13:31:00 UTC 2000
When the date is clearly correct in the database:
reverseblade_development=> select * from blogs;
id | postdate | posttitle | post | created_at |
updated_at
----±---------±-----------±------±---------------------------±---------------------------
4 | 13:31:00 | Test again | again | 2009-12-22 18:32:06.800273 |
2009-12-22 18:32:06.800273
Here is the code that displays the date:
<% @blogs.each do |blog| %>
<%=h blog.postdate%>
<%=h blog.posttitle %>
<%=h blog.post %>
<%= link_to ‘Show’, blog %>
<%= link_to ‘Edit’, edit_blog_path(blog) %>
<%= link_to ‘Destroy’, blog, :confirm => ‘Are you sure?’, :method =>
:delete %>
<% end %>
Is there some sort of conversion that I am missing someplace?
- Rilindo
–
You received this message because you are subscribed to the Google
Groups “Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.