-
Notifications
You must be signed in to change notification settings - Fork 147
Open
Description
For a simple Object with DateTime field, assign UTC-Time to it and serialize the object to json-text, then deserialize an object from the same json-text, the UTC-Time does not match with the original value (your time zone should not be UTC to reproduce the bug).
Code Example:
public class MUtcTime
{
public long ID { get; set; }
public DateTime LogUtcTime { get; set; }
}
public static void Test()
{
var m = new MUtcTime
{
ID = 100,
LogUtcTime = DateTime.UtcNow,
};
var jText = fastJSON.JSON.ToJSON(m);
var gBack = fastJSON.JSON.ToObject<MUtcTime>(jText);
if (m.LogUtcTime == gBack.LogUtcTime)
Console.Write("Pass");
else
Console.Write("Failed");
}
Metadata
Metadata
Assignees
Labels
No labels