class method
self.current
Ruby on Rails 8.0.4
Since v3.0.20Signature
self.current()
Returns Time.zone.now when Time.zone or config.time_zone are set, otherwise just returns Time.now.
Source
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 39
def current
::Time.zone ? ::Time.zone.now : ::Time.now
end
Defined in activesupport/lib/active_support/core_ext/time/calculations.rb line 39
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Time