It is not safe to call the system library mktime() function on Windows
with a date in the 70s. Use 1990 instead.
g_date_time_unref (dt);
memset (&tm, 0, sizeof (tm));
g_date_time_unref (dt);
memset (&tm, 0, sizeof (tm));
tm.tm_mday = 1;
tm.tm_mon = 0;
tm.tm_hour = 0;
tm.tm_mday = 1;
tm.tm_mon = 0;
tm.tm_hour = 0;
t = mktime (&tm);
dt = g_date_time_new_from_unix_local (t);
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);
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);