Upgrade to tzcode-2016f.
No significant changes other than a default implementation of strftime_l.
Change-Id: I6edd2c03e5e7559f012c0c87d43f7109d641d3ca
diff --git a/tests/time_test.cpp b/tests/time_test.cpp
index 10399c5..028a359 100644
--- a/tests/time_test.cpp
+++ b/tests/time_test.cpp
@@ -176,6 +176,27 @@
#endif
}
+TEST(time, strftime_l) {
+ locale_t cloc = newlocale(LC_ALL, "C.UTF-8", 0);
+ locale_t old_locale = uselocale(cloc);
+
+ setenv("TZ", "UTC", 1);
+
+ struct tm t;
+ memset(&t, 0, sizeof(tm));
+ t.tm_year = 200;
+ t.tm_mon = 2;
+ t.tm_mday = 10;
+
+ // Date and time as text.
+ char buf[64];
+ EXPECT_EQ(24U, strftime_l(buf, sizeof(buf), "%c", &t, cloc));
+ EXPECT_STREQ("Sun Mar 10 00:00:00 2100", buf);
+
+ uselocale(old_locale);
+ freelocale(cloc);
+}
+
TEST(time, strptime) {
setenv("TZ", "UTC", 1);