Class: UtcTime

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

Class Method Summary collapse

Class Method Details

.parse(record_date, record_time) ⇒ Object



2
3
4
5
6
7
# File 'lib/gatekeeper_api_client/utc_time.rb', line 2

def self.parse(record_date, record_time)
  date = record_date.tr('.', '-')
  time = record_time.tr('.', ':')

  timezone.local_to_utc(Time.parse([date, time].join(" ")))
end

.timezoneObject



9
10
11
# File 'lib/gatekeeper_api_client/utc_time.rb', line 9

def self.timezone
  TZInfo::Timezone.get(ENV["GATEKEEPER_TIMEZONE"])
end