r22604 - gnucash/trunk/src/libqof/qof - Implement internal replacements for localtime, mktime, etc.

John Ralls jralls at code.gnucash.org
Sat Dec 1 17:42:11 EST 2012


Author: jralls
Date: 2012-12-01 17:42:10 -0500 (Sat, 01 Dec 2012)
New Revision: 22604
Trac: http://svn.gnucash.org/trac/changeset/22604

Modified:
   gnucash/trunk/src/libqof/qof/gnc-date.c
   gnucash/trunk/src/libqof/qof/gnc-date.h
   gnucash/trunk/src/libqof/qof/test/test-gnc-date.c
Log:
Implement internal replacements for localtime, mktime, etc.

The builtin time functions suffer from the "2038 bug" caused by
overflowing a 32-bit representation of seconds from 1 Jan 1970. Provide
functions based on GDateTime which use a 64-bit representation (like our
Timespec), replace all of the instances in gnc-date.c, and make other
adjustments needed to ensure that the tests pass on a 32-bit system.



More information about the gnucash-patches mailing list