[glib/glib-2-26] GDateTime: fix a test that fails from time to time
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-26] GDateTime: fix a test that fails from time to time
- Date: Fri, 17 Sep 2010 22:30:33 +0000 (UTC)
commit 0a2f04510e173c5489b5fd6dce34cd861b3b56f8
Author: Ryan Lortie <desrt desrt ca>
Date: Sat Sep 18 01:18:13 2010 +0300
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.
glib/tests/gdatetime.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
index 846fbc8..e6b1c4d 100644
--- a/glib/tests/gdatetime.c
+++ b/glib/tests/gdatetime.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]