diff --git a/drizzle-orm/src/pg-core/columns/timestamp.ts b/drizzle-orm/src/pg-core/columns/timestamp.ts index 9bac240f1..cf49f694b 100644 --- a/drizzle-orm/src/pg-core/columns/timestamp.ts +++ b/drizzle-orm/src/pg-core/columns/timestamp.ts @@ -50,6 +50,14 @@ export class PgTimestamp> extends PgCo } override mapFromDriverValue = (value: string): Date | null => { + // Enhanced timezone validation with regex to detect timezone indicators + const hasTimezone = /[+-]\d{2}:?\d{2}$|Z$/.test(value); + + if (this.withTimezone && !hasTimezone) { + // Assume UTC if no timezone specified (fixes AWS Data API case) + return new Date(value + 'Z'); + } + return new Date(this.withTimezone ? value : value + '+0000'); };