Work around tzcode's reliance on signed overflow.
I've mailed the tz list about this, and will switch to whatever upstream fix comes along as soon as it's available. Bug: 10310929 Change-Id: I36bf3fcf11f5ac9b88137597bac3487a7bb81b0f
This commit is contained in:
@@ -54,3 +54,16 @@ TEST(time, gmtime) {
|
||||
ASSERT_EQ(0, broken_down->tm_mon);
|
||||
ASSERT_EQ(1970, broken_down->tm_year + 1900);
|
||||
}
|
||||
|
||||
#ifdef __BIONIC__
|
||||
TEST(time, mktime_10310929) {
|
||||
struct tm t;
|
||||
memset(&t, 0, sizeof(tm));
|
||||
t.tm_year = 200;
|
||||
t.tm_mon = 2;
|
||||
t.tm_mday = 10;
|
||||
|
||||
ASSERT_EQ(-1, mktime(&t));
|
||||
ASSERT_EQ(-1, mktime_tz(&t, "UTC"));
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user