I\'ve got code that does time tracking for employees. It creates a counter to show the employee how long they have been clocked in for.
This is the current code:
I am using ruby-2.1.4 and for me the following worked
Time.now - Time.new(2014,11,05,17,30,0)
gave me the time difference in seconds
reference: ruby doc