@return [String]
# File lib/seahorse/model/shapes.rb, line 382 def initialize(definition, options = {}) @format = definition['timestampFormat'] super end
@param [Time] time @param [String] default_format The format to default to
when {#format} is not set on this timestamp shape.
@return [String]
# File lib/seahorse/model/shapes.rb, line 394 def format_time(time, default_format) format = @format || default_format case format when 'iso8601' then time.utc.iso8601 when 'rfc822' then time.utc.rfc822 when 'httpdate' then time.httpdate when 'unixTimestamp' then time.utc.to_i else msg = "invalid timestamp format #{format.inspect}" raise ArgumentError, msg end end