From d6890640b2944a93fc1596e6baec1546834e36c5 Mon Sep 17 00:00:00 2001 From: Justin Wiley Date: Wed, 23 Nov 2016 18:06:35 -0800 Subject: [PATCH] Fixed time formatting in ec2/models.py (#778) * Fixed time formatting in ec2/models.py * Used freezegun on test that was failing due to time progression causing timestamp differences. --- moto/ec2/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moto/ec2/models.py b/moto/ec2/models.py index 02638e3b9..496fc5b8f 100755 --- a/moto/ec2/models.py +++ b/moto/ec2/models.py @@ -917,7 +917,7 @@ class Ami(TaggedEC2Resource): self.architecture = None self.kernel_id = None self.platform = None - self.creation_date = datetime.utcnow().isoformat() + self.creation_date = utc_date_and_time() if instance: self.instance = instance