Skip to content

Commit 3cd6086

Browse files
Simplify timestamp parsing - Date() handles both formats
1 parent 1d2d25d commit 3cd6086

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

packages/sources/generic-api/src/transport/multi-http.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,7 @@ const transportConfig: HttpTransportConfig<HttpTransportTypes> = {
7272
}
7373
}
7474
const timestampValue = objectPath.get(response.data, param.providerIndicatedTimePath)
75-
76-
// Support both ISO 8601 strings and Unix milliseconds (number)
77-
if (typeof timestampValue === 'number') {
78-
providerIndicatedTimeUnixMs = timestampValue
79-
} else {
80-
providerIndicatedTimeUnixMs = new Date(timestampValue).getTime()
81-
}
75+
providerIndicatedTimeUnixMs = new Date(timestampValue).getTime()
8276

8377
// Validate: must be finite and positive
8478
if (!Number.isFinite(providerIndicatedTimeUnixMs) || providerIndicatedTimeUnixMs <= 0) {

0 commit comments

Comments
 (0)