I'm displaying events from a PostgreSQL database, and my timestamps show as if they are going to happen in four hours..
Using select * from event
in my database shows the correct timestamp. Why is rails displaying a different timestamp than what is in the database?
I would like to just show the timestamp as it is in the database.
Controller code:
ips_timestamp = event.timestamp.to_s(format = :db)
@ips_events += [timestamp: ips_timestamp]
View code:
<% @ips_events.each do |event| %>
<%= event[:timestamp] %>