From: Ryan Lortie Date: Tue, 26 Jul 2011 11:38:04 +0000 (+0200) Subject: GDateTime test: 1970 doesn't exist on Windows X-Git-Tag: 2.29.16~67 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=44e85f73643ca24656aa89906d33a1385dcc87a5;p=platform%2Fupstream%2Fglib.git GDateTime test: 1970 doesn't exist on Windows It is not safe to call the system library mktime() function on Windows with a date in the 70s. Use 1990 instead. --- diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c index 611095c..0a9099e 100644 --- a/glib/tests/gdatetime.c +++ b/glib/tests/gdatetime.c @@ -108,7 +108,7 @@ test_GDateTime_new_from_unix (void) g_date_time_unref (dt); memset (&tm, 0, sizeof (tm)); - tm.tm_year = 70; + tm.tm_year = 90; tm.tm_mday = 1; tm.tm_mon = 0; tm.tm_hour = 0; @@ -117,7 +117,7 @@ test_GDateTime_new_from_unix (void) t = mktime (&tm); dt = g_date_time_new_from_unix_local (t); - g_assert_cmpint (g_date_time_get_year (dt), ==, 1970); + g_assert_cmpint (g_date_time_get_year (dt), ==, 1990); g_assert_cmpint (g_date_time_get_month (dt), ==, 1); g_assert_cmpint (g_date_time_get_day_of_month (dt), ==, 1); g_assert_cmpint (g_date_time_get_hour (dt), ==, 0);