From 87dda9de2a1c8a3b9fb6da4553c714eef63f2de8 Mon Sep 17 00:00:00 2001 From: David Graham Date: Tue, 2 Aug 2022 15:23:31 -0600 Subject: [PATCH] Serialize dates in UTC All PlanetScale databases are in UTC. Co-authored-by: iheanyi --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 3142af4..d13cf16 100644 --- a/src/index.ts +++ b/src/index.ts @@ -127,7 +127,7 @@ export class Connection { async execute(query: string, args?: object | any[]): Promise { const startTime = Date.now() const url = new URL('/psdb.v1alpha1.Database/Execute', `https://${this.config.host}`) - query = SqlString.format(query, args) + query = SqlString.format(query, args, false, 'UTC') const saved = await this.postJSON(url, { query: query, session: this.session