この番号1507477743793は、サーバーのタイムスタンプです。あなたがカスタム化するJsonResult
public class CustomJsonResult : JsonResult
{
private const string _dateFormat = "yyyy-MM-dd HH:mm:ss";
public override void ExecuteResult(ControllerContext context)
{
if (context == null)
{
throw new ArgumentNullException("context");
}
HttpResponseBase response = context.HttpContext.Response;
if (!String.IsNullOrEmpty(ContentType))
{
response.ContentType = ContentType;
}
else
{
response.ContentType = "application/json";
}
if (ContentEncoding != null)
{
response.ContentEncoding = ContentEncoding;
}
if (Data != null)
{
// Using Json.NET serializer
var isoConvert = new IsoDateTimeConverter();
isoConvert.DateTimeFormat = _dateFormat;
response.Write(JsonConvert.SerializeObject(Data, isoConvert));
}
}
}
を作成することができます
let t = (new Date(1507477743793)).toUTCString();
console.log(t)
// output
and you get: 2017/12/6 05:32:30pm
ちょうどあなたがJSON response.Iに使用している技術の明確化は、.NET、Javaのなどを意味するために... –
が、そのことについて申し訳ありませんが、私は戻っJSON – Chris
を取得するために、AJAXを使用しています –