Merge pull request #2904 from rwhogg/elb-iso8601

Use ISO 8601 format for ELB DescribeLoadBalancers
This commit is contained in:
Bert Blommers 2020-04-20 16:09:48 +01:00 committed by GitHub
commit 1017e040b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,9 @@
from __future__ import unicode_literals
import datetime
import pytz
from boto.ec2.elb.attributes import (
LbAttributes,
ConnectionSettingAttribute,
@ -83,7 +86,7 @@ class FakeLoadBalancer(BaseModel):
self.zones = zones
self.listeners = []
self.backends = []
self.created_time = datetime.datetime.now()
self.created_time = datetime.datetime.now(pytz.utc)
self.scheme = scheme
self.attributes = FakeLoadBalancer.get_default_attributes()
self.policies = Policies()

View File

@ -442,7 +442,7 @@ DESCRIBE_LOAD_BALANCERS_TEMPLATE = """<DescribeLoadBalancersResponse xmlns="http
{% endfor %}
</SecurityGroups>
<LoadBalancerName>{{ load_balancer.name }}</LoadBalancerName>
<CreatedTime>{{ load_balancer.created_time }}</CreatedTime>
<CreatedTime>{{ load_balancer.created_time.isoformat() }}</CreatedTime>
<HealthCheck>
{% if load_balancer.health_check %}
<Interval>{{ load_balancer.health_check.interval }}</Interval>