From 4f490eea1fe24a85baad76f9ec4499a61dfafb0b Mon Sep 17 00:00:00 2001 From: "Shahid N. Shah" Date: Sun, 28 Jan 2024 13:18:45 -0500 Subject: [PATCH] fix: date formatting was invalid --- pattern/orchestration/duckdb/notebook.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pattern/orchestration/duckdb/notebook.ts b/pattern/orchestration/duckdb/notebook.ts index afebde48..4d3be0e0 100644 --- a/pattern/orchestration/duckdb/notebook.ts +++ b/pattern/orchestration/duckdb/notebook.ts @@ -38,9 +38,8 @@ export class DuckDbOrchEmitContext implements o.OrchEmitContext { get jsRuntimeNow(): SQLa.SqlTextSupplier { return { SQL: () => { - const now = new Date(); - // deno-fmt-ignore - return `make_timestamp(${now.getFullYear()}, ${now.getMonth()+1}, ${now.getDay()}, ${now.getHours()}, ${now.getMinutes()}, ${`${now.getSeconds()}.${now.getMilliseconds()}`})`; + // DuckDB can parse string in ISO 8601 format + return `'${new Date().toISOString()}'`; }, }; }