Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Incorrect DateTime Deserialization in Unity (2021.3.16f1) Mono .NET Standard 2.1 #1546

Copy link
Copy link

Description

@ImanNavidi
Issue body actions

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

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

Additional context

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.