dmitry-chirkov-dremio commented on code in PR #54684:
URL: https://github.com/apache/arrow/pull/54684#discussion_r4345938086
##########
cpp/src/arrow/vendored/datetime/date.h:
##########
@@ -6035,6 +6036,14 @@ to_stream(std::basic_ostream<CharT, Traits>& os, const
CharT* fmt,
if (m < minutes{10})
os << CharT{'0'};
os << m.count();
+ if (s != std::chrono::seconds{0})
Review Comment:
What if a user calls Arrow’s strftime function with %z? The vendored date
library defines %z as +/-hhmm and %Ez as +/-hh:mm, truncating offsets that
include seconds. This change instead returns +000921 or +00:09:21. Please avoid
changing the format contract and handle sub-minute offsets in the
timestamp-to-string cast, for example by formatting these values in UTC as
suggested in #54534.
--
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]