Client Time Zone

Results 1 to 3 of 3

Thread: Client Time Zone

  1. #1
    Ray Wadkins Guest

    Default Client Time Zone

    I have clients who want to provide some information to browsers no more than once a day. Of course, day&#039s begin and end for browsers at different times (relative to the time zone of the server). How can I achieve this. Is there a way to get the current time zone (or offset) from the client? Can you set a cookie&#039s expiration with a specific time zone so that the browser knows when to expire? A hidden form field who&#039s value is set with javascript (yuck!)?

  2. #2
    Join Date
    Dec 1969

    Default RE: Client Time Zone

    Ray,<BR>This is one solution...there probably is better, but I think this would work.<BR><BR>When you set up your clients, have a field in the database called TZone (or whatever). So say you have a client on the west coast, and you are on the east coast. You are 3 hours ahead of your client. This situation all assumes that your server is on the east coast also. Call the VBScript function that gets the time (from your server), and parse that down to just get the value of the hour (let&#039s store that value in a variable called hour). Next, query the database, retrieving the value of TZone (we&#039ll say tzone), and store this value in a variable. Now it is time for the nested if&#039s (this is psudeo code, make necessary changes):<BR><BR>if(tzone = Western)<BR>{ hour = hour - 3; }<BR>if(tzone = Mountain)<BR>{ hour = hour - 2; }<BR>if(tzone = Central)<BR>{ hour = hour - 1; }<BR>else {do nothing since your in the east}<BR><BR>I just reread your question...I don&#039t know if this exactly addresses it, but hope it helps!!!<BR><BR>Good luck,<BR><BR>JOHN

  3. #3
    Ray Wadkins Guest

    Default RE: Client Time Zone

    I think your suggestion assumes I already know where the browser is. Unfortunately I don&#039t. That&#039s the information I need to retrieve from the browser.

Posting Permissions

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