Copilot commented on code in PR #55381: URL: https://github.com/apache/arrow/pull/55381#discussion_r4467360416
########## cpp/src/arrow/util/value_parsing.h: ########## @@ -818,7 +818,9 @@ static inline bool ParseTimestampStrptime(const char* buf, size_t length, // Default the day to the first for formats without a day directive, so that // an explicitly parsed zero day is not mistaken for an omitted one result.tm_mday = 1; -#ifdef _WIN32 +#if defined(_WIN32) || defined(__EMSCRIPTEN__) Review Comment: Switching to `arrow_strptime` silently misparses ordinal dates on Emscripten: `2024-060` with `%Y-%j` succeeds as January 1 instead of February 29 because `%j` only sets `tm_yday`, while this wrapper uses `tm_mon` and `tm_mday`. The vendored parser also discards `%U`/`%W` and rejects `%F`, breaking formats such as `%F %T`. Preserve these calendar directives when switching backends, or explicitly reject unresolved ordinal/week dates rather than returning incorrect timestamps, and add regression coverage. -- 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]
