def time_to_timestamp(time):
    """Converts from a datetime to a string timestamp in a standard ISO 8601 format, with Z timezone for UTC."""
    return time.isoformat(sep='T', timespec='milliseconds') + "Z"