cedaro / grunt-wp-i18n

Internationalize WordPress themes and plugins with Grunt.
MIT License
160 stars 25 forks source link

Output notices when running grunt makepot #19

Closed JJJ closed 10 years ago

JJJ commented 10 years ago

When running grunt makepot in my local environment, I get the following output:

Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /***/node_modules/grunt-wp-i18n/vendor/wp-i18n-tools/makepot.php on line 180

As the error message clearly identifies, the date.timezone is not set in my local php.ini. However, I have an unmodified VVV installation with what I consider to be a very typical homebrew installation of PHP. Since it's mostly turn-key, I suspect it's possible others may see similar output.

An easy fix is to switch calls to date() to gmdate() in two places:

bradyvercher commented 10 years ago

An ini_get()/ini_set() might do the trick, too, but it looks like the creation date header was already using gmdate(), so it's weird that the others aren't UTC as well. Updating those calls is an easy enough fix, so I'll push that out in the next release. Thanks for reporting this.

JJJ commented 10 years ago

Awesome. Thanks @bradyvercher!

JJJ commented 10 years ago

Hey @bradyvercher, any hints on when 4.5 might drop?

bradyvercher commented 10 years ago

Hopefully in the next hour or two. I'm working on the readme and a few tests right now.

bradyvercher commented 10 years ago

This should be good to go now, @johnjamesjacoby