Skip to content

Commit b37b1d6

Browse files
committed
Ensure timestamp/date returns the same values/format as the extended protocol
1 parent 3d6f623 commit b37b1d6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/src/types/text_codec.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,12 @@ class PostgresTextDecoder {
255255

256256
case TypeOid.timestampWithTimezone:
257257
case TypeOid.timestampWithoutTimezone:
258-
return DateTime.parse(di.asText);
259-
258+
return DateTime.parse('${di.asText}Z');
260259
case TypeOid.numeric:
261260
return di.asText;
262261

263262
case TypeOid.date:
264-
return DateTime.parse(di.asText);
263+
return DateTime.parse('${di.asText}T00:00:00Z');
265264

266265
case TypeOid.json:
267266
case TypeOid.jsonb:

0 commit comments

Comments
 (0)