Skip to content

Commit

Permalink
Ensure timestamp/date returns the same values/format as the extended …
Browse files Browse the repository at this point in the history
…protocol
  • Loading branch information
pst9354 committed May 18, 2024
1 parent 3d6f623 commit b37b1d6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/src/types/text_codec.dart
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,12 @@ class PostgresTextDecoder {

case TypeOid.timestampWithTimezone:
case TypeOid.timestampWithoutTimezone:
return DateTime.parse(di.asText);

return DateTime.parse('${di.asText}Z');
case TypeOid.numeric:
return di.asText;

case TypeOid.date:
return DateTime.parse(di.asText);
return DateTime.parse('${di.asText}T00:00:00Z');

case TypeOid.json:
case TypeOid.jsonb:
Expand Down

0 comments on commit b37b1d6

Please sign in to comment.