Date.to_s
is not the same as Time.to_s
. Your postdate
is a Date
, so therefore you might want to look at strftime
instead:
postdate.strftime("%B %d, %Y")
Or even look to add your own custom date format to your Rails app:
Need small help in converting date format in ruby