aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/datetime.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-02-20 05:25:25 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-02-20 05:25:25 +0000
commit2bba78d605d8f71f5e60c63ea66afa43d4e24280 (patch)
tree4e5fc4de2ec09278827cd4b36f7ba85218e14571 /src/backend/utils/adt/datetime.c
parentd1bb0db8dd208236f84f54e3c4ef6eac2ae4e71e (diff)
downloadpostgresql-2bba78d605d8f71f5e60c63ea66afa43d4e24280.tar.gz
postgresql-2bba78d605d8f71f5e60c63ea66afa43d4e24280.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.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index b21c5f217d1..0ce56d07746 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.96.2.3 2003/01/29 01:09:03 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.96.2.4 2003/02/20 05:25:24 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1242,9 +1242,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:
@@ -1958,7 +1956,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: