westonpace commented on a change in pull request #10647:
URL: https://github.com/apache/arrow/pull/10647#discussion_r671500143
##########
File path: cpp/src/arrow/compute/kernels/scalar_temporal_test.cc
##########
@@ -216,5 +216,40 @@ TEST_F(ScalarTemporalTest, DayOfWeek) {
DayOfWeek(timestamps,
DayOfWeekOptions(/*one_based_numbering=*/false,
/*week_start=*/8)));
}
+
+#ifndef _WIN32
+TEST_F(ScalarTemporalTest, Strftime) {
+ auto options_seconds = StrftimeOptions("%Y-%m-%dT%H:%M:%S%z", "UTC");
+ auto options_milliseconds = StrftimeOptions("%Y-%m-%dT%H:%M:%S%z", "GMT");
+ auto options_microseconds = StrftimeOptions("%Y-%m-%dT%H:%M:%S%z",
"Asia/Kolkata");
+ auto options_nanoseconds = StrftimeOptions("%Y-%m-%dT%H:%M:%S%z",
"US/Hawaii");
+
+ const char* times_seconds = R"(["1970-01-01T00:00:59", null])";
+ const char* times_milliseconds = R"(["1970-01-01T00:00:59.123", null])";
+ const char* times_microseconds = R"(["1970-01-01T00:00:59.123456", null])";
+ const char* times_nanoseconds = R"(["1970-01-01T00:00:59.123456789", null])";
+
+ const char* zoned_seconds = R"(["1970-01-01T00:00:59+0000", null])";
+ const char* zoned_milliseconds = R"(["1970-01-01T00:00:59.123+0000", null])";
Review comment:
Possible relevant: Related:
https://github.com/HowardHinnant/date/issues/562
##########
File path: cpp/src/arrow/compute/kernels/scalar_temporal_test.cc
##########
@@ -216,5 +216,40 @@ TEST_F(ScalarTemporalTest, DayOfWeek) {
DayOfWeek(timestamps,
DayOfWeekOptions(/*one_based_numbering=*/false,
/*week_start=*/8)));
}
+
+#ifndef _WIN32
+TEST_F(ScalarTemporalTest, Strftime) {
+ auto options_seconds = StrftimeOptions("%Y-%m-%dT%H:%M:%S%z", "UTC");
+ auto options_milliseconds = StrftimeOptions("%Y-%m-%dT%H:%M:%S%z", "GMT");
+ auto options_microseconds = StrftimeOptions("%Y-%m-%dT%H:%M:%S%z",
"Asia/Kolkata");
+ auto options_nanoseconds = StrftimeOptions("%Y-%m-%dT%H:%M:%S%z",
"US/Hawaii");
+
+ const char* times_seconds = R"(["1970-01-01T00:00:59", null])";
+ const char* times_milliseconds = R"(["1970-01-01T00:00:59.123", null])";
+ const char* times_microseconds = R"(["1970-01-01T00:00:59.123456", null])";
+ const char* times_nanoseconds = R"(["1970-01-01T00:00:59.123456789", null])";
+
+ const char* zoned_seconds = R"(["1970-01-01T00:00:59+0000", null])";
+ const char* zoned_milliseconds = R"(["1970-01-01T00:00:59.123+0000", null])";
Review comment:
Possible relevant: https://github.com/HowardHinnant/date/issues/562
--
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]