From 539573d1025682b6128ebd69fbcda59eb895f913 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 27 Aug 2018 13:59:43 -0700 Subject: [PATCH] Fix issue where occasionally an InteractiveParticipant's lastInputAt and connectedAt times were in Local time instead of UTC (as per the documentation) --- .../MixerInteractive/Source/Scripts/InteractivityManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/InteractiveSDK/Assets/MixerInteractive/Source/Scripts/InteractivityManager.cs b/Source/InteractiveSDK/Assets/MixerInteractive/Source/Scripts/InteractivityManager.cs index abb697b..81ac952 100644 --- a/Source/InteractiveSDK/Assets/MixerInteractive/Source/Scripts/InteractivityManager.cs +++ b/Source/InteractiveSDK/Assets/MixerInteractive/Source/Scripts/InteractivityManager.cs @@ -1941,13 +1941,13 @@ private InteractiveParticipant ReadParticipant(JsonReader jsonReader) jsonReader.Read(); lastInputAtMillisecondsPastEpoch = Convert.ToDouble(jsonReader.Value); DateTime lastInputAtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc); - lastInputAt = lastInputAtDateTime.AddMilliseconds(lastInputAtMillisecondsPastEpoch).ToLocalTime(); + lastInputAt = lastInputAtDateTime.AddMilliseconds(lastInputAtMillisecondsPastEpoch).ToUniversalTime(); break; case WS_MESSAGE_KEY_CONNECTED_AT: jsonReader.Read(); connectedAtMillisecondsPastEpoch = Convert.ToDouble(jsonReader.Value); DateTime connectedAtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc); - connectedAt = connectedAtDateTime.AddMilliseconds(connectedAtMillisecondsPastEpoch).ToLocalTime(); + connectedAt = connectedAtDateTime.AddMilliseconds(connectedAtMillisecondsPastEpoch).ToUniversalTime(); break; case WS_MESSAGE_KEY_GROUP_ID: jsonReader.Read();