def datetime_format(dt):
    """
    Consistent format for timestamps throughout global attirbutes.

    :type dt: datetime
    :param dt: a datetime object
    :return: dt to string
    """
    return dt.strftime('%Y-%m-%dT%H:%M:%S.%f')[:-3] + 'Z'
