Skip to content

Commit 595c2cf

Browse files
author
markzegarelli
committed
Updated description of the way Segment calculates timestamps
1 parent 9c69301 commit 595c2cf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/connections/spec/common.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@ The `receivedAt` timestamp is most important as the sort key in Segment's Wareho
395395

396396
### timestamp
397397

398-
The `timestamp` timestamp specifies when the datapoint occurred, corrected for client-device clock skew. This is the timestamp that is passed to downstream destinations and used for historical replays. It is important to use this timestamp for importing historical data to the API.
398+
The `timestamp` timestamp specifies when the data point occurred, corrected for client-device clock skew. This is the timestamp that is passed to downstream destinations and used for historical replays. It is important to use this timestamp for importing historical data to the API.
399399

400-
If you are using the Segment server Source libraries, or passing calls directly to the HTTP API endpoint, you can manually set the `timestamp` field. If you are using a Segment Source in device mode, the library generates `timestamp` and you cannot manually set one directly in the call payload.
400+
If you are using the Segment server Source libraries, or passing calls directly to the HTTP API endpoint, you can manually set the `timestamp` field. This change updates the `originalTimestamp` field of the Segment event. If you use a Segment Source in device mode, the library generates `timestamp` and you cannot manually set one directly in the call payload.
401+
402+
Segment calculates `timestamp` as `timestamp = receivedAt - (sentAt - originalTimeStamp)`.

0 commit comments

Comments
 (0)