def METHOD_NAME(self, value: Optional[datetime], dialect):
    """Process when returning from database."""
    if value is None:
        return value
    if value.tzinfo is None:
        return value.replace(tzinfo=timezone.utc)
    return value.astimezone(timezone.utc)