pearu commented on code in PR #54657:
URL: https://github.com/apache/arrow/pull/54657#discussion_r4333909953


##########
cpp/src/arrow/util/value_parsing_test.cc:
##########
@@ -869,7 +870,14 @@ TEST(TimestampParser, StrptimeParser) {
   }
 
   // Unparseable strings
-  std::vector<std::string> unparseables = {"foo", "5/1/2000", "5/1/2000 
12:34:56:6"};
+  std::vector<std::string> unparseables = {"foo", "5/1/2000", "5/1/2000 
12:34:56:6",
+                                           // Impossible dates are rejected 
rather
+                                           // than rolled over into the next 
month
+                                           "2/30/2000 12:34:56", "4/31/2000 
12:34:56",
+                                           "2/29/2001 12:34:56",
+                                           // A zero day is rejected rather 
than
+                                           // taken as the first of the month
+                                           "2/00/2000 12:34:56"};

Review Comment:
   Added `0/15/2000 12:34:56`: with the vendored `strptime` on `main` it became 
1999-12-15. Also applied your change; with it the vendored `strptime` rejects 
day and month `00` itself, as glibc does.
   



-- 
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]

Reply via email to