Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/orm/src/client/crud/dialects/postgresql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ export class PostgresCrudDialect<Schema extends SchemaDef> extends BaseCrudDiale

private transformOutputDate(value: unknown) {
if (typeof value === 'string') {
return new Date(value);
// force interpret as UTC
return new Date(value.endsWith('Z') ? value : `${value}Z`);
} else if (value instanceof Date && this.options.fixPostgresTimezone !== false) {
// SPECIAL NOTES:
// node-pg has a terrible quirk that it returns the date value in local timezone
Expand Down