def normalize_timestamp(ts):
    """Normalize a timestamp

    For easier comparison
    """
    if ts is None:
        return
    return re.sub(r'\d(\.\d+)?', '0', ts)
Normalize a timestamp

For easier comparison
jupyterhub/tests/test_api.py