in reply to Server time vs. each user's localtime

This is sort of a "read the docs" question but I'm feeling nice today :)

localtime does what you want, it doesn't return a client's local time, in fact it really doesn't even have a way to do that, (assuming this is a web app) you'd need client side scripting such as Javascript to get the client's local time, either that or (web app or not) use some kind of IP to geographic locater and figure out the client's time that way.

But localtime returns whatever the system's time is set to, if you need Universal time (GMT) then check the gmtime function.

Lobster Aliens Are attacking the world!