Method: DateTime.current
- Defined in:
- activesupport/lib/active_support/core_ext/date_time/calculations.rb
.current ⇒ Object
Returns Time.zone.now.to_datetime when Time.zone or config.time_zone are set, otherwise returns Time.now.to_datetime.
10 11 12 |
# File 'activesupport/lib/active_support/core_ext/date_time/calculations.rb', line 10 def current ::Time.zone ? ::Time.zone.now.to_datetime : ::Time.now.to_datetime end |