*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.71 2002/09/02 02:47:04 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.72 2002/09/03 22:55:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
switch (val)
{
case DTK_EPOCH:
+#ifdef HAVE_INT64_TIMESTAMP
result = ((timestamp - SetEpochTimestamp()) / 1000000e0);
+#else
+ result = timestamp - SetEpochTimestamp();
+#endif
break;
case DTK_DOW:
{
case DTK_EPOCH:
#ifdef HAVE_INT64_TIMESTAMP
- result = ((timestamp - SetEpochTimestamp()) / 100000e0);
+ result = ((timestamp - SetEpochTimestamp()) / 1000000e0);
#else
result = timestamp - SetEpochTimestamp();
#endif