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

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -