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

Commit4dba681

Browse files
committed
Correct bogus output formatting of timeofday() function. A number of
microseconds < 100000 should be displayed as, eg, 13.000126, not 13.126.
1 parent15903a1 commit4dba681

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.81 2001/02/13 14:32:52 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.82 2001/02/21 22:03:00 tgl Exp $
1313
*
1414
* NOTES
1515
*
@@ -1911,13 +1911,13 @@ timeofday(PG_FUNCTION_ARGS)
19111911
{
19121912
structtimevaltp;
19131913
structtimezonetpz;
1914-
chartempl[500];
1915-
charbuf[500];
1914+
chartempl[100];
1915+
charbuf[100];
19161916
text*result;
1917-
intlen=0;
1917+
intlen;
19181918

19191919
gettimeofday(&tp,&tpz);
1920-
strftime(templ,sizeof(templ),"%a %b %d %H:%M:%S.%%d %Y %Z",
1920+
strftime(templ,sizeof(templ),"%a %b %d %H:%M:%S.%%06d %Y %Z",
19211921
localtime((time_t*)&tp.tv_sec));
19221922
snprintf(buf,sizeof(buf),templ,tp.tv_usec);
19231923

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp