diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-02-20 05:24:55 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-02-20 05:24:55 +0000 |
commit | 4df0f1d26f62e835bb357fa7c2e3d5de5fcbf802 (patch) | |
tree | 69c6672d8d02795c391af05d359a1f253aad6cdb /src/backend/utils/adt/datetime.c | |
parent | 69c049cef4ad2bce1b6ac9e96544cbaaa907378e (diff) | |
download | postgresql-4df0f1d26f62e835bb357fa7c2e3d5de5fcbf802.tar.gz postgresql-4df0f1d26f62e835bb357fa7c2e3d5de5fcbf802.zip |
Fix timestamptz_in so that parsing of 'now'::timestamptz gives right
answer when SET TIMEZONE has been done since the start of the current
transaction. Per bug report from Robert Haas.
I plan some futher cleanup in HEAD, but this is a low-risk patch for
the immediate issue in 7.3.
Diffstat (limited to 'src/backend/utils/adt/datetime.c')
-rw-r--r-- | src/backend/utils/adt/datetime.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index 994ab9fae08..625ac11bccb 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.100 2003/02/19 03:48:10 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.101 2003/02/20 05:24:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1253,9 +1253,7 @@ DecodeDateTime(char **field, int *ftype, int nf, case DTK_NOW: tmask = (DTK_DATE_M | DTK_TIME_M | DTK_M(TZ)); *dtype = DTK_DATE; - GetCurrentTimeUsec(tm, fsec); - if (tzp != NULL) - *tzp = CTimeZone; + GetCurrentTimeUsec(tm, fsec, tzp); break; case DTK_YESTERDAY: @@ -1969,7 +1967,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf, case DTK_NOW: tmask = DTK_TIME_M; *dtype = DTK_TIME; - GetCurrentTimeUsec(tm, fsec); + GetCurrentTimeUsec(tm, fsec, NULL); break; case DTK_ZULU: |