Is it safe to use 'date_default_timezone_set' in plugin file?
문제
I am using a sitemaps plugin which in very complex ways sets the timezone of <lastmod>
(i.e. last modified time) for posts to GMT.
Temporarily, until the plugin developer fixes it, I need to enforce a custom timezone on the plugin. The simple and straightforward way that I've found is to add something like date_default_timezone_set( 'America/New_York');
right after the first <?php
in the file responsible for outputting the sitemaps.
It works, and it doesn't seem to affect timestamps displayed on the rest of the site. So, can I go with this? or is there a better solution?
올바른 솔루션이 없습니다
제휴하지 않습니다 wordpress.stackexchange