Skip to content

Commit

Permalink
fix: date formatting was invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
shah committed Jan 28, 2024
1 parent b05afd4 commit 4f490ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pattern/orchestration/duckdb/notebook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ export class DuckDbOrchEmitContext implements o.OrchEmitContext {
get jsRuntimeNow(): SQLa.SqlTextSupplier<SQLa.SqlEmitContext> {
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()}'`;
},
};
}
Expand Down

0 comments on commit 4f490ee

Please sign in to comment.