Question

Dates sometime display in PST, sometimes in UTC

  • 14 February 2019
  • 7 replies
  • 323 views

Userlevel 2
Badge

The majority of my events are being displayed in my local timezone (PST), but sometimes I see events in UTC. The data comes from Segment, which for example sent two events with the following timestamps:

Event 1:

"2019-02-14T17:47:12.901Z"

Event 2:

"2019-02-14T17:47:24.284Z"


When I view these events in a Mixpanel User Profile, they're displayed with the following times:

Event 1 (displays in UTC):

5:47 PM

Event 2 (displays in PST):

9:47 AM


Is there any way to make the dates display in a consistent manner?

Thank you.



7 replies

Badge

Where is it that you're seeing these time stamps?


Userlevel 2
Badge

Under Users > Explore > User Profile



The top event is Event 1, and was sent to Mixpanel with the timestamp: "2019-02-14T17:47:12.901Z"

The bottom event is Event 2, and was sent to Mixpanel with the timestamp:

"2019-02-14T17:47:24.284Z"

There is no reason for them to be displayed with different times, and yet, they are.


Having the same issue.

Did you figure it out @jpeck @pgib ?

I’m facing the same issue as well.

Userlevel 5
Badge +3

@jorditinto & @manishzs —

 

Are both of you using Segment and noticing duplicate events as @jpeck showed above?

 

Mixpanel records all events in Coordinated Universal Time (UTC) at intake, and converts the timezone to your project timezone before writing the event to Mixpanel data stores.

For example, if a project is set to Pacific time (UTC -8), Mixpanel subtracts eight hours from the timestamp before recording it in the database.

(There was another QBQ post about timestamps here for more context)

 

It sounds like the issue here is not necessarily timezone, but that you are seeing two duplicate events with different timezones for each through segment— can you confirm? In the meantime, I’ll look into whether this was a known issue with Segment data. 

I am not using Segment. Looks like this is an issue with Mixpanel. You should not be subtracting timestamp before saving it in database. In all your API calls you should be sending timestamp in UTC and also storing in UTC. Only while rendering the time on the Mixpanel dashboard, you can show it in the timezone of the project.

Userlevel 5
Badge +3

@manishzs — Can you describe the issue that you are seeing, and describe the report that you are seeing that indicates the issue please? I’d be happy to look into it. 

As I mentioned above, all timestamps are recorded with UTC, but since all Mixpanel event data is immutable, it is stored at the timezone of your choosing (your project timezone). 

While I understand the downside to storing timestamps and events in an immutable format, it is a product tradeoff that was made for faster and most efficient report processing times.

 

Reply