When we setup the timezone in wordpress settings page. Does it changes the server time? If I call time(); does it returns unix time according to timezone setup in the settings page?

I have checked this page here How to get WordPress Time Zone setting?

So, if i need to show suppose the current time of a neighborhood site what modification i have to do with the output of time(); function? The php time(); returns the time in the server. So is that depends on where my host belongs?

Thanks in advance!

1 Answer 1


WordPress tries to set PHP environment to UTC timezone. Usually it is more reliable to use time zone-aware WP functions, such as current_time(), rather than vanilla PHP functionality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.