1

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.

1 Answer 1

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.

Your Answer

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

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