得到asp.net的MVC客户机时区 [英] get client machine timezone in asp.net mvc
本文介绍了得到asp.net的MVC客户机时区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何获得客户机的时区ID(例如:中部标准时间)在asp.net mvc的?
How to get the time zone id (ex.: Central Standard Time) of the client machine in asp.net mvc?
推荐答案
它必须要在JavaScript端完成,并且在一个隐藏字段后该值回服务器。看看到<一个href=\"http://www.w3schools.com/jsref/jsref%5FgetTimezoneOffset.asp\">Date.getTimezoneOffset().
It will have to be done on the Javascript side, and post that value in a hidden field back to the server. Look into the Date.getTimezoneOffset().
这篇关于得到asp.net的MVC客户机时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文