jorisvandenbossche commented on issue #36110:
URL: https://github.com/apache/arrow/issues/36110#issuecomment-1594909401
> For reference, same with chrono-tz
Just to ensure I understand correctly: it shows "2058-10-27T00:00:00BST",
but the fact that it shows "BST" indicates it is the same "2058-10-26
23:00:00+00:00" result as with zoneinfo? (given that you indicate both have the
same behaviour)
> sure but the zoneinfo one still looks more correct? e.g. in the UK the DST
transition happens on the last Sunday of October and of March, and
(unfortunately) hasn't announced that they intend to change this.
While extrapolating the current rule into the future instead of
extrapolating a single fixed offset certainly sounds as the option with the
higher chance to be correct, still "There is no way to know the future". The
more into the future, the less sure the result will be, and even what zoneinfo
or chrono-tz shows is only a best guess that is not necessarily a stable result.
But yes, if you want to make a guess, the rule-based guess seems the best
option. And so Arrow also doesn't do that. Showing the same example from your
last post using pyarrow:
```python
>>> pc.assume_timezone(pc.strptime(["2058-10-27 00:00:00"], format="%Y-%m-%d
%H:%M:%S", unit="s"), "Europe/London")
<pyarrow.lib.TimestampArray object at 0x7fd032e10ca0>
[
2058-10-27 00:00:00 # this prints the UTC value, and thus it is not
2058-10-26 23:00:00+00:00
]
```
This logic is performed by the tz.cpp code that is vendored in Arrow, and
the author of that code mentioned the lack of this rule-based extrapolation can
indeed be considered as a bug
(https://github.com/HowardHinnant/date/issues/563#issuecomment-607439821).
I am a bit doubtful that it will get fixed over there, though (there is not
that much activity anymore, because this functionality is also incorporated
into the C++ stdlib starting with C++20. A relevant question is then maybe what
the stdlib does on this front?), unless someone who is interested in seeing
this fixed contributes a patch for it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]