Skip to content

Commit 4da482b

Browse files
committed
Fixed exponential in timestamp
1 parent b3822f2 commit 4da482b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/com/snowplowanalytics/snowplow/tracker/Tracker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ private Payload completePayload(Payload payload, Map context, double timestamp)
6363
payload.add(Parameter.TRACKER_VERSION, Version.VERSION);
6464

6565
// If timestamp is set to 0, generate one
66-
payload.add(Parameter.TIMESTAMP, (timestamp == 0 ? Long.toString(Util.getTimestamp()) : timestamp));
66+
payload.add(Parameter.TIMESTAMP, (timestamp == 0 ? Util.getTimestamp() : timestamp));
6767

6868
// Encodes context data
6969
if (context != null) {

src/main/java/com/snowplowanalytics/snowplow/tracker/Util.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public static int getTransactionId() {
5151
return r.nextInt(999999-100000+1) + 100000;
5252
}
5353

54-
public static Long getTimestamp() {
55-
return System.currentTimeMillis();
54+
public static String getTimestamp() {
55+
return Long.toString(System.currentTimeMillis());
5656
}
5757

5858

0 commit comments

Comments
 (0)