Make Redshift creation time to be UTC
Currently Redshift snapshot is initialized with datetime.now() instead of datetime.utcnow(). It should be UTC time for compatibility.
For reference see models.py. In cluster creation it is:
self.create_time = iso_8601_datetime_with_milliseconds(datetime.datetime.utcnow())
And in snapshot creation it is:
self.create_time = iso_8601_datetime_with_milliseconds(datetime.datetime.now())
Thanks for raising this @matanabudy - marking it as a bug to fix this
Hi, long time but it looks the bug hasn't been actually solved - there are still places (including the original one in the issue - class Snapshot - https://github.com/getmoto/moto/blob/b7624e10b1ec1e351c30b7f8dce76d4f33efcc69/moto/redshift/models.py#L537
Also happening in RDS in some places such as:
https://github.com/getmoto/moto/blob/b7624e10b1ec1e351c30b7f8dce76d4f33efcc69/moto/rds/models.py#L553
Hi @matanabudy - looks like I got RDS and Redshift confused in my first PR.
I've now raised a new PR to change all creation times in RDS and Redshift to be UTC - this should be fixed as of moto >= 4.1.11.dev23