s3_backups/postgres_to_s3.py
def add_datetimes_to_key(self, key):
        """
        Convert the last_modified GMT datetime string to a datetime object and
        create utc and local datetime objects.
        """

        utc = tz.tzutc()
        gmt = tz.gettz('GMT')
        local_tz = tz.tzlocal()

        key.last_modified = datetime.strptime(key.last_modified, "%Y-%m-%dT%H:%M:%S.%fZ")
        key.last_modified = key.last_modified.replace(tzinfo=gmt)
        key.utc_last_modified = key.last_modified.astimezone(utc)
        key.local_last_modified = key.last_modified.astimezone(local_tz)

        return key

        Convert the last_modified GMT datetime string to a datetime object and
        create utc and local datetime objects.
        
Convert the last_modified GMT datetime string to a datetime object and
create utc and local datetime objects.
Convert the last_modified GMT datetime string to a datetime object and create utc and local datetime objects .
def add_datetimes_to_key(self, key):
        utc = tz.tzutc()
        gmt = tz.gettz('GMT')
        local_tz = tz.tzlocal()
        key.last_modified = datetime.strptime(key.last_modified, "%Y-%m-%dT%H:%M:%S.%fZ")
        key.last_modified = key.last_modified.replace(tzinfo=gmt)
        key.utc_last_modified = key.last_modified.astimezone(utc)
        key.local_last_modified = key.last_modified.astimezone(local_tz)
        return key
def add_datetimes_to_key ( self , key ) : utc = tz . tzutc ( ) gmt = tz . gettz ( 'GMT' ) local_tz = tz . tzlocal ( ) key . last_modified = datetime . strptime ( key . last_modified , "%Y-%m-%dT%H:%M:%S.%fZ" ) key . last_modified = key . last_modified . replace ( tzinfo = gmt ) key . utc_last_modified = key . last_modified . astimezone ( utc ) key . local_last_modified = key . last_modified . astimezone ( local_tz ) return key
Convert the last_modified GMT datetime string to a datetime object and
create utc and local datetime objects.
Convert the last_modified GMT datetime string to a datetime object and create utc and local datetime objects .
"""
        Convert the last_modified GMT datetime string to a datetime object and
        create utc and local datetime objects.
        """
self
key