[SOLVED] time()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

time()

Post by ddragas »

One little question.

Function time() takes time from servers computer or from users local computer?
tomek
Forum Newbie
Posts: 5
Joined: Mon Jul 12, 2004 3:51 pm

Post by tomek »

server
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Remember that all php is parsed server side. If you want the users time to be shown you can either use javascript or get the users time difference and do:

Code: Select all

$time = time()+($time_dif*60*60);
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

Post by ddragas »

Thank you folks
Post Reply