【发布时间】:2013-10-07 14:35:28
【问题描述】:
我有一个 Web 方法,我从该方法返回 Date 它正在返回日期,例如 "Mon Sep 30 07:26:14 EDT 2013",当我在我的 javascript 代码中转换日期格式时:
var d= SomeDate.format("MM/dd/yyyy hh:mm:ss tt"); //Somedate is comming from web method
但在 IE7(09/30/2013 04:56:14 PM) 中显示错误的时间,但在 IE9 (09/30/2013 07:26:14 AM)中工作正常。
我们如何在 IE7 中做到这一点?
【问题讨论】:
-
你能检查一下 IE7 和 IE9 的时间戳是否一致吗?做
SomeDate.getTime(),这应该给你相同的号码。
标签: javascript asp.net json webmethod