import time
from datetime import datetime


def convert_times(feed):
    """
    Convert feed parser time_stuct to datetime
    """
    for entry in feed.entries:
        if hasattr(entry, 'updated_parsed'):
            if isinstance(entry.updated_parsed, time.struct_time):
                entry.updated_parsed = datetime(*entry.updated_parsed[:6])
    return feed