diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2012-03-14 23:03:34 +0200 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2012-03-14 23:03:34 +0200 |
commit | ad4fb0d0d2f33ec0165f2a9a50a6d8cbcef4ab82 (patch) | |
tree | 46e07054f4e064ef6f496ad5565c9d6502205de7 /src/backend/utils/adt/date.c | |
parent | 942b63193c722a58ed24b3305308836b47b3f028 (diff) |
Improve EncodeDateTime and EncodeTimeOnly APIs
Use an explicit argument to tell whether to include the time zone in
the output, rather than using some undocumented pointer magic.
Diffstat (limited to 'src/backend/utils/adt/date.c')
-rw-r--r-- | src/backend/utils/adt/date.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c index 85e8fd00ff2..2da4e04a28b 100644 --- a/src/backend/utils/adt/date.c +++ b/src/backend/utils/adt/date.c @@ -1131,7 +1131,7 @@ time_out(PG_FUNCTION_ARGS) char buf[MAXDATELEN + 1]; time2tm(time, tm, &fsec); - EncodeTimeOnly(tm, fsec, NULL, DateStyle, buf); + EncodeTimeOnly(tm, fsec, false, 0, DateStyle, buf); result = pstrdup(buf); PG_RETURN_CSTRING(result); @@ -1918,7 +1918,7 @@ timetz_out(PG_FUNCTION_ARGS) char buf[MAXDATELEN + 1]; timetz2tm(time, tm, &fsec, &tz); - EncodeTimeOnly(tm, fsec, &tz, DateStyle, buf); + EncodeTimeOnly(tm, fsec, true, tz, DateStyle, buf); result = pstrdup(buf); PG_RETURN_CSTRING(result); |