How to determine the timezone?

Results 1 to 2 of 2

Thread: How to determine the timezone?

  1. #1
    Join Date
    Dec 1969

    Default How to determine the timezone?

    I am developing an ASP page, which should display some time specific messages (for example "Happy V&#039;Day" on 14th Feb). The issue is if the server is located in US, it will be displayed according to the US time. It may be 15th in Australia during the 14th evening in US.<BR>Is there a possibility of determining the GMT offset using ASP? If I can then I can display the messages accoring to viewers&#039; time zone.<BR>As the messages are stored in the db, I need to pass the date to the query and get the appropriate messages. Hence, I have to do the time calculation at server side. JavaScript is not going to help me.<BR><BR>Anybody have any better ideas??? I am open for suggestions.

  2. #2
    Join Date
    Dec 1969

    Default The most foolproof way..

    .. is to simply ask the user what timezone they&#039;re in.<BR><BR>But, to do what you accomplish, you actually DO need to use JavaScript and get their time. Then, send that to the server (querystring, form post, cookie, etc) and compare the difference between your server&#039;s time and their time. Then, you can use that # of hours as your basis for adjusting your date/times.<BR><BR>That&#039;s the only way, that I&#039;m aware of.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts