Firehose timestamps need a timezone or a 'Z' at the end (#4459)
This commit is contained in:
parent
3d6ffcc74d
commit
e2f7a1500d
@ -16,7 +16,7 @@ Incomplete list of unfinished items:
|
||||
- put_record(), put_record_batch() always set "Encrypted" to False.
|
||||
"""
|
||||
from base64 import b64decode, b64encode
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timezone
|
||||
from gzip import GzipFile
|
||||
import io
|
||||
import json
|
||||
@ -154,11 +154,11 @@ class DeliveryStream(
|
||||
self.delivery_stream_status = "ACTIVE"
|
||||
self.delivery_stream_arn = f"arn:aws:firehose:{region}:{ACCOUNT_ID}:/delivery_stream/{delivery_stream_name}"
|
||||
|
||||
self.create_timestamp = datetime.utcnow().isoformat()
|
||||
self.create_timestamp = datetime.now(timezone.utc).isoformat()
|
||||
self.version_id = "1" # Used to track updates of destination configs
|
||||
|
||||
# I believe boto3 only adds this field after an update ...
|
||||
self.last_update_timestamp = datetime.utcnow().isoformat()
|
||||
self.last_update_timestamp = datetime.now(timezone.utc).isoformat()
|
||||
|
||||
|
||||
class FirehoseBackend(BaseBackend):
|
||||
@ -622,7 +622,7 @@ class FirehoseBackend(BaseBackend):
|
||||
|
||||
# Increment version number and update the timestamp.
|
||||
delivery_stream.version_id = str(int(current_delivery_stream_version_id) + 1)
|
||||
delivery_stream.last_update_timestamp = datetime.utcnow().isoformat()
|
||||
delivery_stream.last_update_timestamp = datetime.now(timezone.utc).isoformat()
|
||||
|
||||
# Unimplemented: processing of the "S3BackupMode" parameter. Per the
|
||||
# documentation: "You can update a delivery stream to enable Amazon
|
||||
|
Loading…
Reference in New Issue
Block a user