Merge pull request #3040 from timvlaer/fix/s3_bucket_creation_date_tz

Make sure the UTC tz is included in the bucket creation timestamp
This commit is contained in:
Steve Pulec 2020-06-11 20:59:24 -05:00 committed by GitHub
commit 80a3571ff4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,7 @@ import json
import os
import base64
import datetime
import pytz
import hashlib
import copy
import itertools
@ -776,7 +777,7 @@ class FakeBucket(BaseModel):
self.notification_configuration = None
self.accelerate_configuration = None
self.payer = "BucketOwner"
self.creation_date = datetime.datetime.utcnow()
self.creation_date = datetime.datetime.now(tz=pytz.utc)
self.public_access_block = None
self.encryption = None