Menu

All 59 timestamp columns in our schema are without time zone, and the public API still appends a Z
📰

All 59 timestamp columns in our schema are without time zone, and the public API still appends a Z

DEV Community: typescript·Daniel Pertu·1 day ago
#fPYtFqUu
#devtotypescript#devto#dev#date#timestamp
Reading 0:00
15s threshold

Here is a live response from CogniPrep, and the only interesting character in it is the last one:

$ curl -s https://cogniprep.app/api/games/population-stats/balloon { "gameId" : "balloon" , "mean" : 54.12 , "median" : 54 , "stdDev" : 6.51 , "percentiles" :{ "10" : 45.5 , ... , "90" : 62 }, "sampleSize" : 2466 , "lastUpdated" : "2026-10-26T02:00:14.954Z" }

Enter fullscreen mode

Exit fullscreen mode

The Z says UTC. The column it came out of cannot say anything of the kind. Our schema is 25 tables and 1,225 lines of Drizzle, it contains 59 timestamp() columns, and it contains zero with a time zone:

created_at : timestamp (). notNull (). defaultNow (),

Enter fullscreen mode

Exit fullscreen mode

timestamp() with no options is timestamp without time zone . Grep the whole migrations folder, 50 files of it, for timestamptz or with time zone and you get nothing. 48 of those columns carry DEFAULT now() .

That Z is therefore not a fact about the stored value.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.