To know more about UUID please visit here http://en.wikipedia.org/wiki/Universally_unique_identifier
To extract time from UUID. To use the program install the following gem http://rubygems.org/gems/simple_uuid
# The program extracts time from UUID require 'rubygems' require 'simple_uuid' uuid = SimpleUUID::UUID.new uuid.to_guid # actually this is what I have stored in my database puts Time.at(SimpleUUID::UUID.new(uuid.to_guid).seconds)