import pytz
from datetime import datetime


def get_last_modified(obj):
    """Return object's last modified time. """
    if obj.last_modified is None:
        return pytz.UTC.localize(datetime.fromtimestamp(0))

    return obj.last_modified