mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
GDateTime: fix a test that fails from time to time
The test fails if it's a different date in the time zone of the machine running the test than it currently is in UTC.
This commit is contained in:
parent
7be2ba4d94
commit
6393ffa3a6
@ -245,7 +245,7 @@ test_GDateTime_get_ymd (void)
|
||||
memset (&tm, 0, sizeof (struct tm));
|
||||
get_localtime_tm (t, &tm);
|
||||
|
||||
dt = g_date_time_new_from_unix_utc (t);
|
||||
dt = g_date_time_new_from_unix_local (t);
|
||||
g_date_time_get_ymd(dt, &y, &m, &d);
|
||||
g_assert_cmpint(y, ==, tm.tm_year + 1900);
|
||||
g_assert_cmpint(m, ==, tm.tm_mon + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user