提交 98462b73 编写于 作者: T Thomas G. Lockhart

Shift time zone to GMT to correctly evaluate "current" time.

上级 b776831e
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.33 1997/08/21 23:56:40 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.34 1997/09/01 06:13:21 thomas Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -331,6 +331,7 @@ SetDateTime( DateTime dt) {
if (DATETIME_IS_CURRENT(dt)) {
GetCurrentTime(&tt);
tm2datetime( &tt, 0, NULL, &dt);
dt = dt2local( dt, -CTimeZone);
#ifdef DATEDEBUG
printf( "SetDateTime- current time is %f\n", dt);
......@@ -662,6 +663,10 @@ datetime_mi(DateTime *datetime1, DateTime *datetime2)
if (DATETIME_IS_RELATIVE(dt1)) dt1 = SetDateTime(dt1);
if (DATETIME_IS_RELATIVE(dt2)) dt2 = SetDateTime(dt2);
#ifdef DATEDEBUG
printf( "datetime_mi- evaluate %f - %f\n", dt1, dt2);
#endif
if (DATETIME_IS_INVALID(dt1)
|| DATETIME_IS_INVALID(dt2)) {
DATETIME_INVALID( result->time);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册