KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
If my user is in California and they have their computer set to PST, it's 1:00 pm there. If my server is set to EST, the current server time is 4:00 pm. I need a way to get the timezone difference between the client and the server, either in Javascript or C#. In my example, I would get 3 (or -3, doesn't matter). Does anyone know how to do this? EDIT: Possible solution for RedFilter Doing it all in javascript: serverDate = new Date('<%= DateTime.Now.ToString() %>'); clientDate = new Date(); diffMin = (serverDate.getTime()-clientDate.getTime())*1000*60; //get difference in minutes Think that would work? Or would both of those return the same time?
Tags (comma-separated)
Save Edits
Cancel