rok commented on a change in pull request #11229:
URL: https://github.com/apache/arrow/pull/11229#discussion_r716023404
##########
File path: cpp/src/arrow/compute/kernels/scalar_temporal.cc
##########
@@ -528,13 +576,18 @@ struct Strftime {
static Result<Strftime> Make(KernelContext* ctx, const DataType& type) {
const StrftimeOptions& options = StrftimeState::Get(ctx);
- auto timezone = GetInputTimezone(type);
// This check is due to surprising %c behavior.
// See https://github.com/HowardHinnant/date/issues/704
if ((options.format.find("%c") != std::string::npos) && (options.locale !=
"C")) {
return Status::Invalid("%c flag is not supported in non-C locales.");
}
- if (timezone.empty()) {
+ std::string timezone;
+ bool is_timestamp = type.id() == Type::TIMESTAMP;
+ if (is_timestamp) {
Review comment:
Good point! Changed, please check if it makes sense.
--
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]