Skip to content
class method

DateTime.now

(?::Integer start) -> ::DateTime
DateTime.now([start=Date::ITALY]) → datetime

Creates a DateTime object denoting the present time.

Example
DateTime.now              #=> #<DateTime: 2011-06-11T21:20:44+09:00 ...>
See also .new .ordinal .json_create .parse also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0