aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/nabstime.c
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1997-03-28 07:13:21 +0000
committerMarc G. Fournier <scrappy@hub.org>1997-03-28 07:13:21 +0000
commit28454c216b169040411442f954b2f105a03c7f8d (patch)
tree1d2778f8dba19aa1230ad8afcab4c6a65e6e276a /src/backend/utils/adt/nabstime.c
parent159f8c63ad34db0582e375b4e04916128be2a0e4 (diff)
downloadpostgresql-28454c216b169040411442f954b2f105a03c7f8d.tar.gz
postgresql-28454c216b169040411442f954b2f105a03c7f8d.zip
From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: Re: [HACKERS] abstime "now" broken Yes, I broke 'now' :( with an attempt at a bug fix involving servers running in the UTC/GMT timezone. These patches fix the problem, and have been tested in GMT (+00 hours), PST (-08), and NZT (+12) timezones which exercized the code for various cases including across day boundaries. btw, this code fixes the same type of problem for 'today', 'yesterday', 'tomorrow', for DATETIME, ABSTIME, DATE and TIME types. The bugfix itself is quite small, but I have accumulated other changes in the datetime data type and include them here also. One set of changes involves printing ISO-formatted dates and is in response to the helpful information from Kurt Lidl regarding ANSI SQL dates. I'll send another e-mail sometime soon discussing more issues he has raised...
Diffstat (limited to 'src/backend/utils/adt/nabstime.c')
-rw-r--r--src/backend/utils/adt/nabstime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c
index 40701046a72..3ae1978b736 100644
--- a/src/backend/utils/adt/nabstime.c
+++ b/src/backend/utils/adt/nabstime.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.20 1997/03/28 06:54:51 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.21 1997/03/28 07:12:53 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -93,7 +93,7 @@ GetCurrentTime(struct tm *tm)
time_t now;
struct tm *tt;
- now = GetCurrentTransactionStartTime();
+ now = GetCurrentTransactionStartTime()-CTimeZone;
tt = gmtime( &now);
tm->tm_year = tt->tm_year+1900;