Skip to content

Commit

Permalink
Merge pull request #162 from mshriver/fix-openstack-vm-creation-time
Browse files Browse the repository at this point in the history
Update openstack.vm_creation_time
  • Loading branch information
jkrocil authored Aug 4, 2017
2 parents 8144953 + ba34755 commit e90ade6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wrapanapi/openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def vm_creation_time(self, vm_name):
# Example vm.created: 2014-08-14T23:29:30Z
creation_time = datetime.strptime(instance.created, '%Y-%m-%dT%H:%M:%SZ')
# create time is UTC, localize it, strip tzinfo
return creation_time.astimezone(pytz.UTC)
return creation_time.replace(tzinfo=pytz.UTC)

def is_vm_running(self, vm_name):
return self.vm_status(vm_name) in self.states['running']
Expand Down

0 comments on commit e90ade6

Please sign in to comment.