• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

capturing timezone from a browser???

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my Web-based application i need to capture the user's local time/ timezone so that i can have the GMT - offset and there by have an appropriate entry in the database.
Any pointers please???
thank U
~Dee
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use JavaScript to get the current date and time in the client's browser, and send that value back to the server using a GET or POST. This isn't complete, but it will give you the idea:
<BODY onLoad="form.currentDate = new Date()">
<FORM NAME="form" METHOD="post">
<INPUT NAME="currentDate" TYPE="hidden">
</FORM>
</BODY>

[This message has been edited by Mike Titus (edited October 01, 2001).]
 
deep venu
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanx buddy lemme try it out and get back to u..:-)
reply
    Bookmark Topic Watch Topic
  • New Topic