【发布时间】:2016-12-19 05:06:27
【问题描述】:
您好,我遇到了麻烦,我该如何解决这个问题,我搜索了一些文章,但提供的一些示例在 PHP 中。正如我上面的标题,我如何从PC2(Server side where I publish my project) (example of date and time is 8/12/2016 4:40 PM) 获得Date and Time - 以及我的PC1(client side who use the project) (example of date and time is 8/10/2016 5:00) 的当前时间。我想要的是,我想在视图中将server side time 显示到我的一个标签中。甚至我操作/更改PC1 日期和时间设置标签也不会影响/更改,因为它来自PC2 时间。我尝试使用Datetime.now() 并尝试从PC1 更改设置时间,刷新页面后我的标签日期也发生了变化。
【问题讨论】:
标签: javascript asp.net date asp.net-mvc-3 clock-synchronization