Joined May 2012
·
tb

Tomasz Bak

Ruby On Rails and JavaScript craftsman at Selleo
Ruby On Rails and JavaScript craftsman
Selleo
·
Bielsko-Biala, Poland
·
·
·

Posted to Parse Time in given TimeZone over 1 year ago

In Rails app I find it useful to do:
Time.zone.parse("2012-06-29 12:20")

Not doing it can lead to serious bugs:
[1] pry(main)> Time.zone.parse("2012-06-29 12:20")
=> Fri, 29 Jun 2012 12:20:00 IST +01:00
[2] pry(main)> Time.parse("2012-06-29 12:20")
=> 2012-06-29 12:20:00 +0000

@clepore It was _ in alias name, fixed.

Achievements
380 Karma
12,649 Total ProTip Views