Obtaining client's time zone data
Obtaining client's time zone data
It doesn't seem to get transmitted in the browser headers, but somehow it seems to be possible to find out the requesting client's time zone from a server-side program. How could it be done?
- CommonStray
- Forum Assassin
- Posts: 1215
- Joined: 20 Aug 2005, 16:00
- 19
request.getLocale() gives you client env. info
use the date object in javascript, and set a hidden value in a form
example
<script>
document.loginform.tzoffset.value = new Date().getTimezoneOffset();
</sript>
but if your creating a website and you want to know the clients(users) timezone just ask it in a form or something
use the date object in javascript, and set a hidden value in a form
example
<script>
document.loginform.tzoffset.value = new Date().getTimezoneOffset();
</sript>
but if your creating a website and you want to know the clients(users) timezone just ask it in a form or something