Skip to content

Instantly share code, notes, and snippets.

@dux
Created August 28, 2011 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dux/1176673 to your computer and use it in GitHub Desktop.
Save dux/1176673 to your computer and use it in GitHub Desktop.
Time diff in rails for secconds since created
(Time.parse(DateTime.now.to_s) - Time.parse(current_user.created_at.to_s)).to_i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment