rfc:date.timezone_warning_removal

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

rfc:date.timezone_warning_removal [2015/01/27 14:39]
bwoebi
rfc:date.timezone_warning_removal [2017/09/22 13:28]
Line 1: Line 1:
-====== PHP RFC: Remove the date.timezone warning ====== 
-  * Version: 1.0 
-  * Date: 2015-01-27 
-  * Author: Bob Weinand, bobwei9@hotmail.com 
-  * Status: Under Discussion 
-  * First Published at: https://wiki.php.net/rfc/date.timezone_warning_removal 
  
-===== 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. Sure, there exists "-ddate.timezone=UTC", but you usually forget to explicitly specify it and then are annoyed about it. 
- 
-Generally warning should be there to guide the user when developing. Just like superfluous warnings confuse him. 
- 
-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. (In this case PHP 7, being a major too.) 
- 
-===== 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 ===== 
-https://github.com/php/php-src/pull/1029 
- 
-===== References ===== 
-There are enough requests to remove this: 
-  * https://bugs.php.net/bug.php?id=63339 
-  * https://bugs.php.net/bug.php?id=39142 
-  * https://bugs.php.net/bug.php?id=53473 
-  * https://bugs.php.net/bug.php?id=35481 
rfc/date.timezone_warning_removal.txt · Last modified: 2017/09/22 13:28 (external edit)