diff options
author | Bruce Momjian | 2005-07-22 05:08:26 +0000 |
---|---|---|
committer | Bruce Momjian | 2005-07-22 05:08:26 +0000 |
commit | 75e5aba7fef5372178cae43fdf18418ae2757279 (patch) | |
tree | d84003f2b153b95b6b7523a76e77cfc9173011d2 | |
parent | a07628b0706cf17635b1bac9160647cf49335ec1 (diff) |
Update date/time comments.
-rw-r--r-- | src/include/utils/timestamp.h | 8 | ||||
-rw-r--r-- | src/interfaces/ecpg/pgtypeslib/dt.h | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h index 88161f1cce0..52ea3beb287 100644 --- a/src/include/utils/timestamp.h +++ b/src/include/utils/timestamp.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.52 2005/07/21 20:37:21 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.53 2005/07/22 05:08:26 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -67,14 +67,16 @@ typedef struct * DAYS_PER_MONTH is very imprecise. The more accurate value is * 365.2425/12 = 30.436875, or '30 days 10:29:06'. Right now we only * return an integral number of days, but someday perhaps we should - * also return a 'time' value to be used as well. + * also return a 'time' value to be used as well. ISO 8601 suggests + * 30 days. */ #define DAYS_PER_MONTH 30 /* assumes exactly 30 days per month */ #define HOURS_PER_DAY 24 /* assume no daylight savings time changes */ /* * This doesn't adjust for uneven daylight savings time intervals or leap - * seconds, and it crudely estimates leap years. + * seconds, and it crudely estimates leap years. A more accurate value + * for days per years is 365.2422. */ #define SECS_PER_YEAR (36525 * 864) /* avoid floating-point computation */ #define SECS_PER_DAY 86400 diff --git a/src/interfaces/ecpg/pgtypeslib/dt.h b/src/interfaces/ecpg/pgtypeslib/dt.h index baf0e0a3183..abdc3c272b9 100644 --- a/src/interfaces/ecpg/pgtypeslib/dt.h +++ b/src/interfaces/ecpg/pgtypeslib/dt.h @@ -223,14 +223,16 @@ do { \ * DAYS_PER_MONTH is very imprecise. The more accurate value is * 365.2425/12 = 30.436875, or '30 days 10:29:06'. Right now we only * return an integral number of days, but someday perhaps we should - * also return a 'time' value to be used as well. + * also return a 'time' value to be used as well. ISO 8601 suggests + * 30 days. */ #define DAYS_PER_MONTH 30 /* assumes exactly 30 days per month */ #define HOURS_PER_DAY 24 /* assume no daylight savings time changes */ /* * This doesn't adjust for uneven daylight savings time intervals or leap - * seconds, and it crudely estimates leap years. + * seconds, and it crudely estimates leap years. A more accurate value + * for days per years is 365.2422. */ #define SECS_PER_YEAR (36525 * 864) /* avoid floating-point computation */ #define SECS_PER_DAY 86400 |