Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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