Class: DateTime

Inherits:
Object
  • Object
show all
Defined in:
lib/date.rb

Instance Method Summary collapse

Instance Method Details

#unix_timeObject

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



9
10
11
# File 'lib/date.rb', line 9

def unix_time
  strftime('%s').to_f
end