> uval wrote in post #8566:
>> Hello,
>>
>> I would like to calculate the difference between two times in seconds
>> eg
>>
>> Fri Dec =A02 03:12:19 2005
>> Fri Dec =A02 14:44:47 2005

Just keep it simple.  You can do math with Time objects, and the unit
of time for a Time object is the second.  So, turn your dates into
Time objects:

require 'time'
first =3D Time.parse('Fri Dec  2 03:12:19 2005')
second =3D Time.parse('Fri Dec  2 14:44:47 2005')

Then subtract one from the other:

difference =3D second - first


Kirk Haines
Software Engineer
EngineYard