import time


def fix_end_now(json):
    """Set end time to the time now if no end time is give"""
    if 'end' not in json or json['end'] is None:
        json['end'] = int(time.time())
    return json