From 4fa25b8c99cd1e966bae0f3ff47b45853a0778af Mon Sep 17 00:00:00 2001
From: "Thomas G. Lockhart" <lockhart@fourpalms.org>
Date: Sat, 25 Oct 1997 05:22:58 +0000
Subject: [PATCH] Shorten routine names to <= 16 characters to fit in pg_proc
 table.

---
 src/backend/utils/adt/timestamp.c | 25 ++++++++-----------------
 1 file changed, 8 insertions(+), 17 deletions(-)

diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c
index fde86061cb6..fcad2903ca9 100644
--- a/src/backend/utils/adt/timestamp.c
+++ b/src/backend/utils/adt/timestamp.c
@@ -103,22 +103,13 @@ timestampge(time_t t1, time_t t2)
 }
 
 DateTime *
-timestamp_datetime(time_t timestamp)
+stamp_datetime(time_t timestamp)
 {
-	DateTime   *result;
+	return(abstime_datetime((AbsoluteTime) timestamp));
+} /* stamp_datetime() */
 
-	double		fsec = 0;
-	struct tm  *tm;
-
-	if (!PointerIsValid(result = PALLOCTYPE(DateTime)))
-		elog(WARN, "Memory allocation failed, can't convert timestamp to datetime", NULL);
-
-	tm = localtime((time_t *) &timestamp);
-	tm->tm_year += 1900;
-	tm->tm_mon += 1;
-
-	if (tm2datetime(tm, fsec, NULL, result) != 0)
-		elog(WARN, "Unable to convert timestamp to datetime", timestamp_out(timestamp));
-
-	return (result);
-} /* timestamp_datetime() */
+time_t
+datetime_stamp(DateTime *datetime)
+{
+	return((AbsoluteTime) datetime_abstime(datetime));
+} /* datetime_stamp() */
-- 
GitLab