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 | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Yarx

Keese
That Zelda Fanatic
i am a wootest!
Danicess Snuggle Slave!
Fragapalooza!
RTFM!

Level: 20

Posts: 53/133
EXP: 37485
For next: 4954

Since: 03-15-04
From: Edmonton

Since last post: 132 days
Last activity: 18 days
Posted on 05-22-04 08:00 AM Link | Quote
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.
Vystrix Nexoth

Level: 30

Posts: 151/348
EXP: 158678
For next: 7191

Since: 03-15-04
From: somewhere between anima and animus

Since last post: 3 days
Last activity: 2 days
Posted on 05-22-04 12:53 PM Link | Quote
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.
ErkDog

Fuzz Ball
Level: 47

Posts: 571/982
EXP: 752190
For next: 14013

Since: 03-15-04
From: Richmond, VA

Since last post: 40 days
Last activity: 19 days
Posted on 05-22-04 08:54 PM Link | Quote
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...
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 733/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 05-23-04 12:36 AM Link | Quote
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.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
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.005 seconds.