Client's Time

They have: 10 posts

Joined: Feb 2000

I need to get the time from a user's computer who is accessing my webserver.
I know there is a way using JavaScript but it is not solid.

Is their a way in perl or an environment variable that gets passed.

Regards,
Dave

They have: 122 posts

Joined: Jun 2000

No, afaik the web browser doesn't pass the time to the server. Your best bet is to either use javascript or to ask the user what time zone he/she is in.

Rob Radez
OSInvestor.com

They have: 5,633 posts

Joined: Jan 1970

Java Scripting is almost as solid as Perl these days. It’s not very often that you see anyone with a java-less browser these days. I use Java Script to print or to at least collect (meaning to use in a script of some sort) my visitor’s time/date. Never had a problem with it.

------------------
Adam
AIS Internet Solutions
[email protected]
www.aisinternet.com

They have: 10 posts

Joined: Feb 2000

OK - I'll stick with the JavaScript.

Cheers
Dave

They have: 29 posts

Joined: Dec 1999

With the current cookie scare, some people are disabling JavaScript...

They have: 10 posts

Joined: Feb 2000

What do you suggest BitSurfr?

They have: 5,633 posts

Joined: Jan 1970

What cookie scare? Sure there are some people who don’t like them and a lot of the security techs tell you to disable them, but I would go as far as calling it a “scare”. You can also disable cookies with disabling Java.

------------------
Adam
AIS Internet Solutions
[email protected]
www.aisinternet.com

They have: 850 posts

Joined: Jul 1999

They have: 5,633 posts

Joined: Jan 1970

Robp,

I wasn’t saying that there’s not a problem with cookies. Or that a lot of people don’t accept cookies. I did word the post wrong, which was not my intention.. However as I stated before, in both Netscape and IE you can disable cookies, without disabling Java. The only browsers I get on my sites without Java are some of the more alternative browsers and UNIX/Linux browsers.

------------------
Adam
AIS Internet Solutions
[email protected]
www.aisinternet.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.