I added a line of code to the hungryfeed.php
date_default_timezone_set(‘America/New_York’);
It’s specific for MY timezone which unfortunately has that daylight savings time issue. It might be true that there is no way to fix this. I read several articles complaining about timezone issues and php code.
Plugin Contributor
Jason
(@verysimple)
Thanks for figuring that out!
I would actually recommend putting the date_default_timezone_set function call inside your wp-config.php file. Otherwise it’s likely to get overwritten when WordPress or a plugin is updated. Also the setting will load early in the process and all of the WordPress code will have the right timezone.
The proper solution is to actually configure the timezone setting in your server’s php.ini file. That way it will fix the problem server-wide for any PHP scripts that you run. Another alternative if you’re using Apache is to put that setting in your .htaccess file. But if neither of those are an option, then adding that line to your config file is definitely acceptable.