Created
January 16, 2014 08:36
-
-
Save ph3nx/8451619 to your computer and use it in GitHub Desktop.
Handy method to get the current unix time stamp in Ruby. Unix time, or POSIX time, is a system for describing instants in time, defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def timestamp | |
Time.now.to_i | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works like a charm :) I've been using this for more than 4 years