From 44e85f73643ca24656aa89906d33a1385dcc87a5 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Tue, 26 Jul 2011 13:38:04 +0200 Subject: [PATCH] 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. --- glib/tests/gdatetime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.7.4