lib/gocardless/utils.rb
# Format a Time object according to ISO 8601, and convert to UTC.
#
# @param [Time] time the time object to format
# @return [String] the ISO-formatted time
Format a Time object according to ISO 8601, and convert to UTC.
Format a Time object according to ISO 8601 and convert to UTC .
def iso_format_time(time)
      return time unless time.is_a? Time or time.is_a? Date
      time = time.getutc if time.is_a? Time
      time = time.new_offset(0) if time.is_a? DateTime
      time.strftime('%Y-%m-%dT%H:%M:%SZ')
    end
def iso_format_time ( time ) return time unless time . is_a? Time or time . is_a? Date time = time . getutc if time . is_a? Time time = time . new_offset ( 0 ) if time . is_a? DateTime time . strftime ( '%Y-%m-%dT%H:%M:%SZ' ) end
Format a Time object according to ISO 8601, and convert to UTC.
Format a Time object according to ISO 8601 and convert to UTC .
the ISO-formatted time
the ISO - formatted time
String
time
<not_specific>
<not_specific>
time the time object to format
time the time object to format