Skip to content

Commit 75e5aba

Browse files
committed
Update date/time comments.
1 parent a07628b commit 75e5aba

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/include/utils/timestamp.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
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

src/interfaces/ecpg/pgtypeslib/dt.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy