Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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!