aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/btree_gist/btree_ts.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/contrib/btree_gist/btree_ts.c b/contrib/btree_gist/btree_ts.c
index a13dcc8beaa..b9c2b49ef3c 100644
--- a/contrib/btree_gist/btree_ts.c
+++ b/contrib/btree_gist/btree_ts.c
@@ -200,27 +200,11 @@ tstz_dist(PG_FUNCTION_ARGS)
**************************************************/
-static Timestamp
+static inline Timestamp
tstz_to_ts_gmt(TimestampTz ts)
{
- Timestamp gmt;
- int val,
- tz;
-
- gmt = ts;
- DecodeSpecial(0, "gmt", &val);
-
- if (ts < DT_NOEND && ts > DT_NOBEGIN)
- {
- tz = val * 60;
-
-#ifdef HAVE_INT64_TIMESTAMP
- gmt -= (tz * INT64CONST(1000000));
-#else
- gmt -= tz;
-#endif
- }
- return gmt;
+ /* No timezone correction is needed, since GMT is offset 0 by definition */
+ return (Timestamp) ts;
}