user2569524
user2569524

Reputation: 1751

Exclude Timestamp time zone in the display, Rails application

Application.rb :

config.time_zone ='Eastern Time (US & Canada)'

Database entry : on the MySQL database : 2014-06-15 07:44:24.000

On the application interface when I display I get this :

on the application : 2014-06-15 03:44:24 -0400

But I want to display the exact date and time displayed as is, that is on the database like :

2014-06-15 07:44:24.000

Could some one help me out.Thanks!

Upvotes: 0

Views: 109

Answers (1)

bender
bender

Reputation: 1428

If you need to display timestamp in UTC format (the same as in your database), then simply convert time like this:

my_timestamp.utc

Upvotes: 1

Related Questions