def fix_xr_time_for_arc_cog(ds):
    """
    Small helper function to strip milliseconds from
    xr dataset - arcgis pro does not play nicely
    with milliseconds.
    """
    
    # convert datetimes
    dts = ds.time.dt.strftime('%Y-%m-%dT%H:%M:%S')
    dts = dts.astype('datetime64[ns]')
    
    # strip milliseconds
    ds['time'] = dts
    
    return ds