Class: Hyrax::TimeService

Inherits:
Object
  • Object
show all
Defined in:
app/services/hyrax/time_service.rb

Overview

Give the current time in UTC

Use of this service allows a single integration point timestamps. If your application (or test suite) needs to provide a special time for “now”, you can override it here.

Examples:

Hyrax::TimeService.time_in_utc

Class Method Summary collapse

Class Method Details

.time_in_utcDateTime

Returns the current time in UTC.

Returns:

  • (DateTime)

    the current time in UTC



15
16
17
# File 'app/services/hyrax/time_service.rb', line 15

def self.time_in_utc
  DateTime.current
end