Can I get the browser time zone in ASP.NET or do I have to rely on JS operations to retrieve the information
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no “Accept-Timezone” header (or the like) – the HTTP standard does not contain any facility to allow the browser to automatically tell the server what time zone the user cares about.
The basic approach is to use a date and read the TZ info from it.
Since there’s no standard (cross-browser time zone naming functions – you have to resort to something like (yikes!):