Class: TimeService

Inherits:
Object
  • Object
show all
Defined in:
lib/time_service.rb

Class Method Summary collapse

Class Method Details

.nowObject



2
3
4
5
6
7
8
# File 'lib/time_service.rb', line 2

def self.now
    config = SimpleConfig.for(:application)
    config.timeservice.call()
rescue
    Rails.logger.error("Could not call time service: SimpleConfig is not initialized, there's no application scope, no timeservice property, or it's not a lambda.")
    return DateTime.now.utc
end