Saturday, September 5, 2009

Parse timestamp string to ruby Time object


# Require time to get parse() method
$ irb
>> require 'time'
>> true
>> Time.parse('Tue Apr 07 22:52:51 +0000 2009')
>> Tue Apr 07 22:52:51 0800 2009

No comments:

Blog Archive