html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/3942#issuecomment-965599998,https://api.github.com/repos/pydata/xarray/issues/3942,965599998,IC_kwDOAMm_X845jeL-,2448579,2021-11-10T18:01:46Z,2021-11-10T18:01:46Z,MEMBER,"> Please may I ask: Why not default to xarray encoding time as 'units': 'nanoseconds since 1970-01-01' to be consistent with np.datetime64[ns]? It's choosing the highest resolution that matches the data, which has the benefit of allowing the maximum possible time range given the data's frequency: https://github.com/pydata/xarray/blob/5871637873cd83c3a656ee6f4df86ea6628cf68a/xarray/coding/times.py#L317-L319 I'm not sure if this is why it was originally chosen; but that is one advantage. Perhaps @spencerkclark has some insight here.","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,595492608 https://github.com/pydata/xarray/issues/3942#issuecomment-965591847,https://api.github.com/repos/pydata/xarray/issues/3942,965591847,IC_kwDOAMm_X845jcMn,2448579,2021-11-10T17:52:20Z,2021-11-10T17:52:20Z,MEMBER,"> let's definitely add a note to the documentation to say that it might be a good idea for users to manually specify the encoding for datetimes if they wish to append to Zarrs. :+1: > However I think xarray should raise an error when trying to append times that cannot be represented by the on-disk encoding. Adding this error message would make it obvious that this is happening. PRs are very welcome!","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,595492608 https://github.com/pydata/xarray/issues/3942#issuecomment-610429922,https://api.github.com/repos/pydata/xarray/issues/3942,610429922,MDEyOklzc3VlQ29tbWVudDYxMDQyOTkyMg==,2448579,2020-04-07T14:46:06Z,2020-04-07T14:46:06Z,MEMBER,"I have run in to this problem before. The initial choice to use `int64` and `days since ...` is perfectly valid. However I think xarray should raise an error when trying to append times that cannot be represented by the on-disk encoding. Note that you can always specify an encoding to make sure that you can append properly.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,595492608