Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking if the user is online with time().

Status
Not open for further replies.

perlTest

Programmer
Nov 16, 2002
14
0
0
US
Hi,

I have a database where the user info are stored and when a user login, it stored the last time they logged in. The time is in seconds like: 1038798090. How do I check with the current time and the last logged in time to figure if the user is been active for the last 2 or 3 minutes?
 
the functions gmtime() and localtime() convert seconds to readable time

and use localtime(time) to get current local time Mike

"Experience is the comb that Nature gives us, after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top