r22614 - gnucash/trunk/src - Remove date exceptions.
John Ralls
jralls at code.gnucash.org
Sat Dec 1 17:43:44 EST 2012
Author: jralls
Date: 2012-12-01 17:43:44 -0500 (Sat, 01 Dec 2012)
New Revision: 22614
Trac: http://svn.gnucash.org/trac/changeset/22614
Modified:
gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c
gnucash/trunk/src/backend/dbi/test/test-dbi.xml
gnucash/trunk/src/engine/test/test-date.c
Log:
Remove date exceptions.
GncDate can now handle all dates between 1 Jan 0001 and 31 Dec 9999
(proleptic Gregorian).
Modified: gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c
===================================================================
--- gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c 2012-12-01 22:43:34 UTC (rev 22613)
+++ gnucash/trunk/src/backend/dbi/test/test-dbi-stuff.c 2012-12-01 22:43:44 UTC (rev 22614)
@@ -160,7 +160,6 @@
g_assert_cmpint (sx_2->autoCreateNotify, ==, sx_1->autoCreateNotify);
g_assert_cmpint (sx_2->advanceCreateDays, ==, sx_1->advanceCreateDays);
g_assert_cmpint (sx_2->advanceRemindDays, ==, sx_1->advanceRemindDays);
-
}
static void
@@ -223,7 +222,6 @@
g_assert (DBI_ERROR_NONE == dbi_conn_error( conn->conn, &errmsg));
}
-
g_slist_free( index_list );
Modified: gnucash/trunk/src/backend/dbi/test/test-dbi.xml
===================================================================
(Binary files differ)
Modified: gnucash/trunk/src/engine/test/test-date.c
===================================================================
--- gnucash/trunk/src/engine/test/test-date.c 2012-12-01 22:43:34 UTC (rev 22613)
+++ gnucash/trunk/src/engine/test/test-date.c 2012-12-01 22:43:44 UTC (rev 22614)
@@ -24,17 +24,6 @@
ts.tv_nsec /= 1000;
ts.tv_nsec *= 1000;
- /* We just can't handle dates whose time_t doesn't fit in int - skip those
- * cases. */
- if (ts.tv_sec > (0x7fffffff - 3600 * 25))
- return TRUE;
-
- /* If we are east of UTC, we also can't handle dates whose tv_sec member
- * falls in the range [0, -gnc_timezone(tm)) - make sure were are at least 12
- * hours past the epoch to skip those cases too */
- if (ts.tv_sec < 3600 * 12)
- return TRUE;
-
gnc_timespec_to_iso8601_buff (ts, str);
/* The time, in seconds, everywhere on the planet, is always
@@ -328,7 +317,7 @@
if/when we support it. */
ts.tv_nsec = 0;
ts.tv_sec = (long long int) 0x7fffffff + 3600 * 24 * 10;
- //check_time(ts, do_print);
+ check_time(ts, do_print);
/* Various 'special' times. What makes these so special? */
ts.tv_sec = 152098136;
More information about the gnucash-changes
mailing list