A
A
Art Snail2017-01-07 14:45:14
Ruby on Rails
Art Snail, 2017-01-07 14:45:14

How to convert timestamp without time zone to Time in rails?

Hello.
I get the values ​​of the create_at column from the Postgresql database.
Output @article.create_at - result 2017-01-07 12:05:19 +0300 => timestamp without time zone
Please tell me how can I convert the result to Time format?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
oh_shi, 2017-01-07
@artsnail

.to_datetime
.strftime("%m.%d.%Y at %k:%M:%S")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question