You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C++][R] strptime fails to parse with %b or %B on Windows #31816
Dragoș Moldovan-Grünfeld / @dragosmg:
The test-dplyr-funcs-datetime.R file where the unit test failing on the CI mentioned in the ticket description forces LC_TIME to be "C".
Snippet:
# base::strptime() defaults to local timezone# but arrow's strptime defaults to UTC.# So that tests are consistent, set the local timezone to UTC# TODO: consider reevaluating this workaround after ARROW-12980withr::local_timezone("UTC")
if (tolower(Sys.info()[["sysname"]]) =="windows") {
withr::local_locale(LC_TIME="C")
}
PR #50146 (primarily about CSV date/time parsing) includes a fix for this: the vendored musl strptime used on Windows compiles out all name-based specifiers because nl_langinfo() is unavailable there. The PR adds static C-locale name tables, making %b/%B (and %a/%A/%h) parse on Windows, case-insensitively, matching musl's C-locale behavior on Linux. Validated on Windows CI (MinGW CLANG64/MINGW64, MSVC Python wheel, RTools, MATLAB, and ARM64 MSVC). The issue's reproducer ("2021 September 13" with "%Y %B %d") parses with that change.
Activity
asfimport commentedon May 3, 2022
Rok Mihevc / @rok:
A relevant c++ test would in scalar_string_test.cc would be:
asfimport commentedon May 3, 2022
Rok Mihevc / @rok:
This could be a locale issue. We also noticed this behaviour on a windows machine with:
asfimport commentedon May 3, 2022
Dragoș Moldovan-Grünfeld / @dragosmg:
The
test-dplyr-funcs-datetime.Rfile where the unit test failing on the CI mentioned in the ticket description forcesLC_TIMEto be"C".Snippet:
pearu commentedon Jun 11, 2026
PR #50146 (primarily about CSV date/time parsing) includes a fix for this: the vendored musl
strptimeused on Windows compiles out all name-based specifiers becausenl_langinfo()is unavailable there. The PR adds static C-locale name tables, making%b/%B(and%a/%A/%h) parse on Windows, case-insensitively, matching musl's C-locale behavior on Linux. Validated on Windows CI (MinGW CLANG64/MINGW64, MSVC Python wheel, RTools, MATLAB, and ARM64 MSVC). The issue's reproducer ("2021 September 13"with"%Y %B %d") parses with that change.