Skip to content

Commit

Permalink
fix: timestamp parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt committed Mar 5, 2024
1 parent 860a7a7 commit 4e95283
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/backend/src/utils/ingest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,13 @@ const recursiveToCamel = (item: any): any => {
}

export const cleanEvent = async (event: any): Promise<Event> => {
console.log(event)
const { timestamp, runId, parentRunId, tags, name, ...rest } =
recursiveToCamel(event)

let isoTimestamp
try {
isoTimestamp = new Date(timestamp.toISOString())
isoTimestamp = new Date(timestamp).toISOString()
} catch (error) {
console.error("Couldn't parse timestamp")
console.error(event)
Expand Down

0 comments on commit 4e95283

Please sign in to comment.