Hi I am trying to fig out a way to get the clients timezone details and store it in the database which will be u开发者_如何学运维sed to calculate UTC dates later on. So what I need is
1) a way to get the clients timezone infor WITHOUT the user selecting from a list (so might need a javascript) 2) What are the timezone details I would need to store which I can then later on use to calculate UTC dates for that user
Please note the project is based on MVC framework
You may try to detect the timezone using javascript and here's a more robust version. Then include it in a hidden field or query string variable so that the server can fetch it.
You can use getTimezoneOffset() method in javascript.
It returns the time difference between Greenwich Mean Time (GMT) and local time, in minutes.
精彩评论