I would like to find a way to determin what time zone or what the time zone offset is related to "GMT" I know I need a client side script and from what I understand about javascript is that it most certenly is client side. Any suggestion on how to determin the client time zone offset from "GMT" and then send it back to server side so that I can store that as a cookie whenever a user logs into my website would be great. Once I get the "offset" back to the server I should be ok. I use coldfusion just in case anyone knows a way to do it with just coldfusion although like I said I think I need client side script to make this work. Thanks a bunch!
Don't divide it by 60 if you would prefer the value to be in minutes, instead of hours. <script type="text/javascript"> function xmitOffset(){ var refDate = new Date(); var gmtOffset = refDate.getTimezoneOffset() / 60; var AdminRequest = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); AdminRequest.open("GET", "saveUserOffset.php?offset="+gmtOffset, true); AdminRequest.send(null); } onload=xmitOffset; </script> Code (markup): saveUserOffset.php: $userGMTOffset = $_GET['offset']; Code (markup):