We’re looking to add a new event property “UTC Event Time” that’s accurate to the millisecond to help us sort events into their proper order. The values that we’re sending for this property aren’t what we see on the server, however. Instead of UTC the values seem to be shifted to local time.
We send: 2020-06-02T11:04:21.548Z -> We see: 2020-06-02T04:04:21.548
Any advice here? We’ve changed the format into something not directly castable to SQL DateTime to get around this, but that is making our downstream processing much more difficult.
Best answer by jcoplen
Hey, thanks for getting back to me. We were sending the timestamp as a separate event property “UTC Event Time” as a formatted string that Mixpanel was modifying. We found that if we send it as a 64-bit integer Unix timestamp, it’s not modified, but still easy to cast to a SQL DateTime value. This is the solution we went with.
Note, even after setting our projects time zone to UTC, we still seemed to get unpredictable results. It’s possible that we were looking at “old” events that had already been modified, though.