class DateTime

Public Instance Methods

unix_time() click to toggle source

Returns the Unix time, also know as POSIX time or Unix epoch. The number of seconds elapsed since midnight of January 1, 1970 UTC

return

Fixnum

# File lib/date.rb, line 8
def unix_time
  strftime('%s').to_f
end