-
-
Save sanderv32/e410d06208dc9d68227b7ae44e9161fe 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