Is WordPress's timezone supposed to be set to UTC within themes and plugins?
问题 I'm building a custom theme and plugin for WordPress and noticed that calls to date_default_timezone_get() return "UTC" even though: PHP is configured to the local timezone. Wordpress is set to the local timezone in Settings:General:Timezone. Is this correct behaviour for WordPress, or do I have something misconfigured, a bad plugin, etc.? Do I need to switch to my local timezone before any calls to PHP's date and time functions (and then restore it later)? 回答1: Yes, WordPress does work in