def METHOD_NAME(val):
    try:
        dt = datetime.utcfromtimestamp(int(val))
    except (OSError, OverflowError, TypeError, ValueError):
        pass
    else:
        now = timezone.now()
        if abs(now - dt) < timedelta(days=5*366):
            return dt
    return val