Sha256: 15065c8dcb978229b214ba1d7da385779b90432b33aabc3851500522894e02f8

Contents?: true

Size: 401 Bytes

Versions: 10

Compression:

Stored size: 401 Bytes

Contents

module Aws
  # @api private
  module TimestampFormatter

    include Seahorse::Model::Shapes

    def timestamp(shape, value)
      value = case shape
        when Iso8601TimestampShape then value.iso8601
        when Rfc822TimestampShape then value.rfc822
        when UnixTimestampShape then value.to_i
        else raise "invalid timestamp format `#{shape.class.name}'"
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
aws-sdk-core-2.0.0.rc10 lib/aws/timestamp_formatter.rb
aws-sdk-core-2.0.0.rc9 lib/aws/timestamp_formatter.rb
aws-sdk-core-2.0.0.rc8 lib/aws/timestamp_formatter.rb
aws-sdk-core-2.0.0.rc7 lib/aws/timestamp_formatter.rb
aws-sdk-core-2.0.0.rc6 lib/aws/timestamp_formatter.rb
aws-sdk-core-2.0.0.rc5 lib/aws/timestamp_formatter.rb
aws-sdk-core-2.0.0.rc4 lib/aws/timestamp_formatter.rb
aws-sdk-core-2.0.0.rc3 lib/aws/timestamp_formatter.rb
aws-sdk-core-2.0.0.rc2 lib/aws/timestamp_formatter.rb
aws-sdk-core-2.0.0.rc1 lib/aws/timestamp_formatter.rb