drizzle-team / drizzle-team/drizzle-orm

[BUG]: Timestamp formatting inconsistent in nested queries

Open
#3,400 1 comment 0 reactions 0 assignees View on GitHub
bug bug/fixed-in-beta db/postgres
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### What version of `drizzle-orm` are you using?

0.36.0

### What version of `drizzle-kit` are you using?

0.27.1

### Describe the Bug

Timestamps are stored in postgres in a SQL format, e.g. `2024-11-02 14:30:45.123456`. ISO8601 format is similar, but different, e.g. `2024-11-02T14:30:45.123456`.

When pulling timestamps out of the database, they appear in SQL format, unless they're in a nested query, in which case they're ISO8601.

### Expected behavior

A consistent format! Either SQL-92 or ISO8601 is great, but it should be consistent.

### Environment & setup

Minimal reproduction: https://drizzle.run/uad69lw0jpa8kbg846kxbl0a

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.