Module: ThreeScale::Backend::TimeHacks::ClassMethods

Defined in:
lib/3scale/backend/extensions/time.rb

Instance Method Summary collapse

Instance Method Details

#parse_to_utc(input) ⇒ Object



74
75
76
77
78
79
# File 'lib/3scale/backend/extensions/time.rb', line 74

def parse_to_utc(input)
  input = input.to_s

  # Test firts for a UNIX timestamp, since it is the most useful way to specify UTC time
  parse_unix_timestamp(input) || parse_non_unix_timestamp(input)
end