Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3e1a373

Browse files
committed
Allow text timezone designations, e.g. "America/Chicago", when using the
ISO "T" timestamptz format.
1 parent 7514208 commit 3e1a373

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/backend/utils/adt/datetime.c

+10
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,16 @@ DecodeDateTime(char **field, int *ftype, int nf,
944944
break;
945945

946946
case DTK_TIME:
947+
/*
948+
* This might be an ISO time following a "t" field.
949+
*/
950+
if (ptype != 0)
951+
{
952+
/* Sanity check; should not fail this test */
953+
if (ptype != DTK_TIME)
954+
return DTERR_BAD_FORMAT;
955+
ptype = 0;
956+
}
947957
dterr = DecodeTime(field[i], fmask, INTERVAL_FULL_RANGE,
948958
&tmask, tm, fsec);
949959
if (dterr)

0 commit comments

Comments
 (0)