You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When serialize and then deserialize a DateTime objects, sometimes the deserilized version would have a fixed value of "02/07/2106 06:28:15"!
Repro steps
using System;
using MessagePack;
using UnityEngine;
public class MainMenu : MonoBehaviour
{
void Start()
{
for (int i = 0; i < 10; i++)
{
var b = MessagePackSerializer.Serialize(DateTime.Now);
DateTime c = MessagePackSerializer.Deserialize<DateTime>(b);
Debug.Log(c);
}
}
}
above script attached to maincamera of a 2d Scene.
Expected behavior
Deserialized value should be equal to DateTime value before serialization.
Actual behavior
Deserilized value would be DateTime object with value "02/07/2106 06:28:15"
Version used: 2.4.35
Runtime: Unity version 2021.3.16f1, Mono .NET Standard 2.1
Bug description
When serialize and then deserialize a DateTime objects, sometimes the deserilized version would have a fixed value of "02/07/2106 06:28:15"!
Repro steps
above script attached to maincamera of a 2d Scene.
Expected behavior
Deserialized value should be equal to DateTime value before serialization.
Actual behavior
Deserilized value would be DateTime object with value "02/07/2106 06:28:15"
Additional context