r21704 - gnucash/trunk/src/libqof/qof - Improve comments a bit: Add clarifications about which second of the day is returned.
Christian Stimming
cstim at code.gnucash.org
Sat Dec 10 16:09:54 EST 2011
Author: cstim
Date: 2011-12-10 16:09:53 -0500 (Sat, 10 Dec 2011)
New Revision: 21704
Trac: http://svn.gnucash.org/trac/changeset/21704
Modified:
gnucash/trunk/src/libqof/qof/gnc-date.h
Log:
Improve comments a bit: Add clarifications about which second of the day is returned.
Modified: gnucash/trunk/src/libqof/qof/gnc-date.h
===================================================================
--- gnucash/trunk/src/libqof/qof/gnc-date.h 2011-12-10 13:25:18 UTC (rev 21703)
+++ gnucash/trunk/src/libqof/qof/gnc-date.h 2011-12-10 21:09:53 UTC (rev 21704)
@@ -209,7 +209,9 @@
Timespec timespec_abs(const Timespec *t);
/** convert a timepair on a certain day (localtime) to
- * the timepair representing midday on that day */
+ * the timepair representing midday on that day. Watch out - this is *not* the
+ * first second of the day, which is returned by various other functions
+ * returning a Timespec. */
Timespec timespecCanonicalDayTime(Timespec t);
/** Returns the current clock time as a Timespec, taken from time(2). */
@@ -228,14 +230,14 @@
/** Turns a Timespec into a GDate */
GDate timespec_to_gdate (Timespec ts);
-/** Turns a GDate into a Timespec */
+/** Turns a GDate into a Timespec, returning the first second of the day */
Timespec gdate_to_timespec (GDate d);
/** Convert a day, month, and year to a GDate. Similar to g_date_new_dmy() but
* returns by-value and not by pointer. */
GDate gnc_dmy2gdate (gint day, gint month, gint year);
-/** Convert a day, month, and year to a Timespec */
+/** Convert a day, month, and year to a Timespec, returning the first second of the day */
Timespec gnc_dmy2timespec (gint day, gint month, gint year);
/** Same as gnc_dmy2timespec, but last second of the day */
More information about the gnucash-changes
mailing list