Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - Web Application - Time and TimeZones
  
User name:
Password:
Reply:
 

UserPost
HyperLamer
Posts: 733/8210
Well you could just make it an option; specify a time zone or automatically detect it. And yes, it's possible to get the time with Javascript. I think you use the Date object.
ErkDog
Posts: 571/982
yeah, I know you can definitely grab it with Java.... but why would you want -their- time ? shouldn't the time be standardized ?? as in used off the server ??

and if they are in a differnet timezone, then THEY can input the offset...
Vystrix Nexoth
Posts: 151/348
when a new person views the site, have javascript automatically forward them to another page, with a timestamp in the URI. figure out their timezone offset from that, and set it as a cookie. thereafter, if they have the cookie, don't output the auto-redirect thing in javascript.

although that'd suck if they reject the cookie...

just, if they're not logged in, they get server time; if they are, use the above method (or some variant thereof) so they can have local time.
Yarx
Posts: 53/133
Is there a way to get the current time of the computer requesting a web page? Either through the HTTP Header or maybe in the enviroment variables... I'd like to deal with the whole time zone issue transparently on my site. Currently I ask the user what time zone they are in, but even if done correctly, daylight saving plays a big hassle.

Any ideas?

I have thought of submitting the client's time when they login by setting their current time to a hidden field of the form, but then I am depending on that login in order to get this information. I'd like to grab it from all users when they first request the page, whether they are a guest or a regular user. So that I can generate dynamic content and display the correct time for them.
Acmlm's Board - I2 Archive - Programming - Web Application - Time and TimeZones


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.009 seconds.