Method: Time.current
- Defined in:
- activesupport/lib/active_support/core_ext/time/calculations.rb
.current ⇒ Object
Returns Time.zone.now when Time.zone or config.time_zone are set, otherwise just returns Time.now.
39 40 41 |
# File 'activesupport/lib/active_support/core_ext/time/calculations.rb', line 39 def current ::Time.zone ? ::Time.zone.now : ::Time.now end |