[test] Fix types-test on MacOS

In MacOS the `%F` date format pads the date with leading zeros. While
on other linux distributions it does not. It appears to be an issue for other
software as well:
https://bugs.python.org/issue32195

As a quick workaround I added special handling to the test for leading
zeros.

Change-Id: Ic11d2e1828e141f678ea8f417c57b188e322c660
Reviewed-on: http://gerrit.cloudera.org:8080/15768
Tested-by: Kudu Jenkins
Reviewed-by: Bankim Bhavsar <bankim@cloudera.com>
Reviewed-by: Alexey Serbin <aserbin@cloudera.com>
diff --git a/src/kudu/common/types-test.cc b/src/kudu/common/types-test.cc
index a662e03..343d8ee 100644
--- a/src/kudu/common/types-test.cc
+++ b/src/kudu/common/types-test.cc
@@ -54,7 +54,12 @@
 };
 
 TEST_F(TestTypes, TestDatePrinting) {
+#if defined(__APPLE__)
+  // On MacOS the `%F` date format pads the year with zeros.
+  TestDateToString("0001-01-01", *DataTypeTraits<DATE>::min_value());
+#else
   TestDateToString("1-01-01", *DataTypeTraits<DATE>::min_value());
+#endif
   TestDateToString("9999-12-31", *DataTypeTraits<DATE>::max_value());
   TestDateToString("1970-01-01", 0);
   TestDateToString("1942-08-16", -10000);