rfc:date.timezone_warning_removal

This is an old revision of the document!


PHP RFC: Remove the date.timezone warning

Introduction

Each time we use date() or generally functions which make use of the date.timezone ini setting, we get a warning. Even when only just trying to try something small with PHP cli involving dates, especially without a default php.ini installed, we can't just get nice output without an annoying warning.

Thus, I'd like to remove this warning in favor of a better user experience.

Proposal

Removing the date.timezone warning in case the date.timezone ini setting is empty.

The date.timezone warning has this text:

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.

Proposed PHP Version(s)

Targeting the next minor version.

Unaffected PHP Functionality

If the date.timezone ini setting is set but invalid, a warning is still thrown. The default is and remains UTC.

Proposed Voting Choices

Remove this warning (50%+1 vote):

  • Yes
  • No

Patch

References

rfc/date.timezone_warning_removal.1422319272.txt.gz · Last modified: 2017/09/22 13:28 (external edit)