From 062256ada323c80ec5ffe0d9656ef4cde4e394ff Mon Sep 17 00:00:00 2001 From: Chris Henry Date: Sun, 18 Jan 2015 15:53:59 -0500 Subject: [PATCH] Use the current time when launching an instance. --- moto/ec2/models.py | 1 + moto/ec2/responses/instances.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/moto/ec2/models.py b/moto/ec2/models.py index e9246a6b..57462100 100644 --- a/moto/ec2/models.py +++ b/moto/ec2/models.py @@ -299,6 +299,7 @@ class Instance(BotoInstance, TaggedEC2Resource): self.subnet_id = kwargs.get("subnet_id") self.key_name = kwargs.get("key_name") self.source_dest_check = "true" + self.launch_time = datetime.now().strftime('%y-%m-%dT%H:%M:%S%z') self.block_device_mapping = BlockDeviceMapping() self.block_device_mapping['/dev/sda1'] = BlockDeviceType(volume_id=random_volume_id()) diff --git a/moto/ec2/responses/instances.py b/moto/ec2/responses/instances.py index 7922f9d9..49b385a5 100644 --- a/moto/ec2/responses/instances.py +++ b/moto/ec2/responses/instances.py @@ -325,7 +325,7 @@ EC2_DESCRIBE_INSTANCES = """