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.

we are trying to figure out what's happening with our site's timezone. On general settings it shows that local time is correct while showing the UTC time next to it. The locale we have it as Los Angeles but for some reason when 5pm comes, the site changes to new day. Meaning it's counting everything, including registrations as UTC and not PST. Is there a way to make sure it's PST? Even if that means changing core files.

share|improve this question

1 Answer 1

WordPress always sets time zone to UTC and native PHP functions will report and operate that in its environment.

To get local time (adjusted from UTC by WP's timezone setting) you need to use WP's functions, such as date_i18n() and others.

It's confusing, but it's much less problematic to do it WP way, than try to adjust its timezone mechanics.

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.