MCPcopy Create free account
hub / github.com/aws/aws-cli / _convert_timestamp_to_str

Method _convert_timestamp_to_str

awscli/botocore/serialize.py:153–160  ·  view source on GitHub ↗
(self, value, timestamp_format=None)

Source from the content-addressed store, hash-verified

151 return formatdate(value, usegmt=True)
152
153 def _convert_timestamp_to_str(self, value, timestamp_format=None):
154 if timestamp_format is None:
155 timestamp_format = self.TIMESTAMP_FORMAT
156 timestamp_format = timestamp_format.lower()
157 datetime_obj = parse_to_aware_datetime(value)
158 converter = getattr(self, f'_timestamp_{timestamp_format}')
159 final_value = converter(datetime_obj)
160 return final_value
161
162 def _get_serialized_name(self, shape, default_name):
163 # Returns the serialized name for the shape if it exists.

Calls 1

parse_to_aware_datetimeFunction · 0.90

Tested by

no test coverage detected