projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7be2ba4
)
GDateTime: fix a test that fails from time to time
author
Ryan Lortie
<desrt@desrt.ca>
Fri, 17 Sep 2010 22:18:13 +0000
(
01:18
+0300)
committer
Ryan Lortie
<desrt@desrt.ca>
Fri, 17 Sep 2010 22:20:22 +0000
(
01:20
+0300)
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
patch
|
blob
|
history
diff --git
a/glib/tests/gdatetime.c
b/glib/tests/gdatetime.c
index
846fbc8
..
e6b1c4d
100644
(file)
--- 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);