Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Field eventTimestamp behaviour for standard vs custom events

Discussion in 'Unity Analytics' started by FranArjona, Apr 30, 2022.

  1. FranArjona

    FranArjona

    Joined:
    Oct 25, 2015
    Posts:
    17
    I'm using the new Analytics library with different events and I have noticed that the field eventTimestamp is always automatically included for either standard/default events (like gameStarted) and custom ones like one I created called levelStarted.

    Then, I'm in UK timezone, which is GMT+1.

    So, I have noticed, than in the event browser on Unity GS, I can see that:
    • collectInsertedTimestamp is always behaving using UTC times as expected
    • eventTimestamp, however is using UTC for standard events and local time for custom ones
    Here an example of what I'm saying (screenshots directly from UGS > Analytics Event Browser > View event content):
    gameStarted using UTC/GMT+0
    unity_event_game_started.png
    levelStarted using GMT+1
    unity_event_level_started.png
    Notice how in the first one, both times are UTC (15:21:XX) and in the second one only one of them is UTC and the other GMT+1 (15:23 & 16:23).

    Shouldn't the times be consistent? Is this an expected behaviour in any way?

    If this is expected, how can I standardise so all the eventTimestamp records to UTC as I cannot find anything to do that in custom events, through the SDK.

    The versions I'm using are:
    • Unity 2021.3.1f1
    • "com.unity.services.analytics": "4.0.0-pre.2"
    • Testing the feature within the editor
     
  2. EllieF_Unity

    EllieF_Unity

    Unity Technologies

    Joined:
    Nov 27, 2020
    Posts:
    39
    Hi Fran,

    Thanks for reporting this. I am talking to the developers and will get back to you soon with an update as soon as I have some clarification from them.
     
  3. EllieF_Unity

    EllieF_Unity

    Unity Technologies

    Joined:
    Nov 27, 2020
    Posts:
    39
    Hi Fran,

    I have just received confirmation from the developers that this is a bug. It has been filed as high priority and a fix is being worked on now. It seems as though the SDK is using two different functions to retrieve the timestamp for each type of event.

    Thanks again for reporting this. I will provide updates as I receive new information from the developers.
     
  4. FranArjona

    FranArjona

    Joined:
    Oct 25, 2015
    Posts:
    17
    Hi Ellie,

    Of course, no problem. Happy to contribute :)

    Thanks for the quick response and acting. Also, let me know if I can be of any help.

    And, for sure, any info or update about it is appreciated.
     
  5. EllieF_Unity

    EllieF_Unity

    Unity Technologies

    Joined:
    Nov 27, 2020
    Posts:
    39
    Hi Fran,

    Thanks for waiting. This bug has been resolved in the latest version of the Analytics SDK: v4.0.0-pre.3
     
  6. FranArjona

    FranArjona

    Joined:
    Oct 25, 2015
    Posts:
    17
    Nice, thanks for the heads-up!