r22830 - gnucash/trunk/src/libqof/qof - Fix erroneous conversion from time64 to struct tm because the Sunday weekday has a different number in GDateTime vs. struct tm.

Christian Stimming cstim at code.gnucash.org
Fri Mar 22 17:40:02 EDT 2013


Author: cstim
Date: 2013-03-22 17:40:01 -0400 (Fri, 22 Mar 2013)
New Revision: 22830
Trac: http://svn.gnucash.org/trac/changeset/22830

Modified:
   gnucash/trunk/src/libqof/qof/gnc-date.c
   gnucash/trunk/src/libqof/qof/test/test-gnc-date.c
Log:
Fix erroneous conversion from time64 to struct tm because the Sunday weekday has a different number in GDateTime vs. struct tm.

In struct tm, the weekday is in the range 0..6 with Sunday=0, but
in GDateTime the weekday is in the range 1..7 with Sunday=7. This should
better be added to the GDateTime documentation at g_date_time_get_day_of_week,
but apparently nobody documented this so far.



More information about the gnucash-patches mailing list