ruby on rails - Getting -0200 in DateTime from MySQL/Database -
i'm getting column type datetime , comes mysql database.
but can't %h:%m:%s
(it's showing me 00:00:00
) because guess going wrong here. see:
= debug current_user.last_access_at.to_s
output:
'2014-01-20 11:15:40 -0200'
what -0200
there? , plus, how can time correctly?
note i'm using ruby on rails.
this timezone offset.
it means have setting -2 hours timezone 0.
for more useful format can use strftime(format)
instead of to_s
Comments
Post a Comment