Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit98462b7

Browse files
author
Thomas G. Lockhart
committed
Shift time zone to GMT to correctly evaluate "current" time.
1 parentb776831 commit98462b7

File tree

1 file changed

+6
-1
lines changed
  • src/backend/utils/adt

1 file changed

+6
-1
lines changed

‎src/backend/utils/adt/dt.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.33 1997/08/21 23:56:40 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.34 1997/09/01 06:13:21 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -331,6 +331,7 @@ SetDateTime( DateTime dt) {
331331
if (DATETIME_IS_CURRENT(dt)) {
332332
GetCurrentTime(&tt);
333333
tm2datetime(&tt,0,NULL,&dt);
334+
dt=dt2local(dt,-CTimeZone);
334335

335336
#ifdefDATEDEBUG
336337
printf("SetDateTime- current time is %f\n",dt);
@@ -662,6 +663,10 @@ datetime_mi(DateTime *datetime1, DateTime *datetime2)
662663
if (DATETIME_IS_RELATIVE(dt1))dt1=SetDateTime(dt1);
663664
if (DATETIME_IS_RELATIVE(dt2))dt2=SetDateTime(dt2);
664665

666+
#ifdefDATEDEBUG
667+
printf("datetime_mi- evaluate %f - %f\n",dt1,dt2);
668+
#endif
669+
665670
if (DATETIME_IS_INVALID(dt1)
666671
||DATETIME_IS_INVALID(dt2)) {
667672
DATETIME_INVALID(result->time);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp