File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
interfaces/ecpg/pgtypeslib Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 66 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
77 * Portions Copyright (c) 1994, Regents of the University of California
88 *
9- * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.52 2005/07/21 20:37:21 momjian Exp $
9+ * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.53 2005/07/22 05:08:26 momjian Exp $
1010 *
1111 *-------------------------------------------------------------------------
1212 */
@@ -67,14 +67,16 @@ typedef struct
6767 * DAYS_PER_MONTH is very imprecise. The more accurate value is
6868 * 365.2425/12 = 30.436875, or '30 days 10:29:06'. Right now we only
6969 * return an integral number of days, but someday perhaps we should
70- * also return a 'time' value to be used as well.
70+ * also return a 'time' value to be used as well. ISO 8601 suggests
71+ * 30 days.
7172 */
7273#define DAYS_PER_MONTH 30 /* assumes exactly 30 days per month */
7374#define HOURS_PER_DAY 24 /* assume no daylight savings time changes */
7475
7576/*
7677 * This doesn't adjust for uneven daylight savings time intervals or leap
77- * seconds, and it crudely estimates leap years.
78+ * seconds, and it crudely estimates leap years. A more accurate value
79+ * for days per years is 365.2422.
7880 */
7981#define SECS_PER_YEAR (36525 * 864) /* avoid floating-point computation */
8082#define SECS_PER_DAY 86400
Original file line number Diff line number Diff line change @@ -223,14 +223,16 @@ do { \
223223 * DAYS_PER_MONTH is very imprecise. The more accurate value is
224224 * 365.2425/12 = 30.436875, or '30 days 10:29:06'. Right now we only
225225 * return an integral number of days, but someday perhaps we should
226- * also return a 'time' value to be used as well.
226+ * also return a 'time' value to be used as well. ISO 8601 suggests
227+ * 30 days.
227228 */
228229#define DAYS_PER_MONTH 30 /* assumes exactly 30 days per month */
229230#define HOURS_PER_DAY 24 /* assume no daylight savings time changes */
230231
231232/*
232233 * This doesn't adjust for uneven daylight savings time intervals or leap
233- * seconds, and it crudely estimates leap years.
234+ * seconds, and it crudely estimates leap years. A more accurate value
235+ * for days per years is 365.2422.
234236 */
235237#define SECS_PER_YEAR (36525 * 864) /* avoid floating-point computation */
236238#define SECS_PER_DAY 86400
You can’t perform that action at this time.
0 commit comments