Determining Time Zones

Results 1 to 3 of 3

Thread: Determining Time Zones

  1. #1
    Wallar Guest

    Default Determining Time Zones

    &nbsp;<BR>If you have any ideas on how to determine the time zone in ASP (i.e. PDT versus PST) that would be most appreciated. Thanks.<BR> <BR> <BR><BR> <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Determining Time Zones

    Well, I assume you mean time zone of the client, as (hopefully) the server won&#039t be roaming around too much..<BR><BR>Try this:<BR><BR>&#060;script language=javascript&#062;<BR>&#060;!--<BR> var dtNow = new Date();<BR> document.write(dtNow);<BR>//--&#062;<BR>&#060;/script&#062;<BR><BR>NOTE: I tested this with IE 5 and Netscape 4.5 - here are the results:<BR><BR>IE:Wed Nov 17 19:47:07 EST 1999 <BR>Netscape:Wed Nov 17 19:50:28 GMT-0500 (Eastern Standard Time) 1999 <BR><BR>I&#039m not sure how much has to do with local machine settings, so beware.<BR><BR>Good luck!<BR><BR>Mike

  3. #3
    suresh Guest

    Default RE: Determining Time Zones

    in javascript u have many functions from which we can get from which timezone user is calling.<BR>u have <BR>today=new Date()<BR>GMTstring=today.toGMTString()<BR>UserGmt Hour=GMTstring.substring(17,19) <BR>UserGmtOffset=today.getTimezoneOffset()/60 //GMT offset of user machine

Posting Permissions

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