Use ISO 8601 format for ELB DescribeLoadBalancers

This commit is contained in:
Bob Wombat Hogg 2020-04-18 07:46:28 -04:00
parent bdeeeb701a
commit 891801d569
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>