From: Derick Rethans Date: Tue, 27 Jan 2009 13:44:38 +0000 (+0000) Subject: - Elevate no-tz setting made from E_STRICT to E_WARNING. X-Git-Tag: php-5.4.0alpha1~191^2~4378 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e1277e317ea9012d79fdb7d7f4303d505430411;p=php - Elevate no-tz setting made from E_STRICT to E_WARNING. #- [DOC] --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 23566bc2fb..6abef40c47 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -714,8 +714,8 @@ PHP_RSHUTDOWN_FUNCTION(date) #define DATE_FORMAT_ISO8601 "Y-m-d\\TH:i:sO" #define DATE_TZ_ERRMSG \ - "It is not safe to rely on the system's timezone settings. Please use " \ - "the date.timezone setting, the TZ environment variable or the " \ + "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. " @@ -852,7 +852,7 @@ static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC) tzid = "UTC"; } - php_error_docref(NULL TSRMLS_CC, E_STRICT, DATE_TZ_ERRMSG "We selected '%s' for '%s/%.1f/%s' instead", tzid, ta ? ta->tm_zone : "Unknown", ta ? (float) (ta->tm_gmtoff / 3600) : 0, ta ? (ta->tm_isdst ? "DST" : "no DST") : "Unknown"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, DATE_TZ_ERRMSG "We selected '%s' for '%s/%.1f/%s' instead", tzid, ta ? ta->tm_zone : "Unknown", ta ? (float) (ta->tm_gmtoff / 3600) : 0, ta ? (ta->tm_isdst ? "DST" : "no DST") : "Unknown"); return tzid; } #endif @@ -871,7 +871,7 @@ php_win_std_time: if (! tzid) { tzid = "UTC"; } - php_error_docref(NULL TSRMLS_CC, E_STRICT, DATE_TZ_ERRMSG "We selected '%s' for '%.1f/no DST' instead", tzid, ((tzi.Bias + tzi.StandardBias) / -60.0)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, DATE_TZ_ERRMSG "We selected '%s' for '%.1f/no DST' instead", tzid, ((tzi.Bias + tzi.StandardBias) / -60.0)); break; /* DST in effect */ @@ -885,7 +885,7 @@ php_win_std_time: if (! tzid) { tzid = "UTC"; } - php_error_docref(NULL TSRMLS_CC, E_STRICT, DATE_TZ_ERRMSG "We selected '%s' for '%.1f/DST' instead", tzid, ((tzi.Bias + tzi.DaylightBias) / -60.0)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, DATE_TZ_ERRMSG "We selected '%s' for '%.1f/DST' instead", tzid, ((tzi.Bias + tzi.DaylightBias) / -60.0)); break; } return tzid; diff --git a/ext/date/tests/date_default_timezone_get-1.phpt b/ext/date/tests/date_default_timezone_get-1.phpt index b6494658e4..383394a955 100644 --- a/ext/date/tests/date_default_timezone_get-1.phpt +++ b/ext/date/tests/date_default_timezone_get-1.phpt @@ -9,8 +9,8 @@ date.timezone= echo date('e'), "\n"; ?> --EXPECTF-- -Strict Standards: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-1.php on line 3 +Warning: date_default_timezone_get(): 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 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-1.php on line 3 UTC -Strict Standards: date(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-1.php on line 4 +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 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-1.php on line 4 UTC diff --git a/ext/date/tests/date_default_timezone_get-2.phpt b/ext/date/tests/date_default_timezone_get-2.phpt index 73013a7626..e52dc14f72 100644 --- a/ext/date/tests/date_default_timezone_get-2.phpt +++ b/ext/date/tests/date_default_timezone_get-2.phpt @@ -8,5 +8,5 @@ date.timezone=CEST echo date_default_timezone_get(), "\n"; ?> --EXPECTF-- -Strict Standards: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-2.php on line 3 +Warning: date_default_timezone_get(): 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 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-2.php on line 3 UTC diff --git a/ext/date/tests/date_default_timezone_set-1.phpt b/ext/date/tests/date_default_timezone_set-1.phpt index 3c7a9aa4d6..c6a6daf7a8 100644 --- a/ext/date/tests/date_default_timezone_set-1.phpt +++ b/ext/date/tests/date_default_timezone_set-1.phpt @@ -18,9 +18,9 @@ date.timezone= echo date(DATE_ISO8601, $date4), "\n"; ?> --EXPECTF-- -Strict Standards: strtotime(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_set-1.php on line 3 +Warning: strtotime(): 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 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_set-1.php on line 3 -Strict Standards: strtotime(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_set-1.php on line 4 +Warning: strtotime(): 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 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_set-1.php on line 4 America/Indiana/Knox 2005-01-12T03:00:00-0500 2005-07-12T03:00:00-0500 diff --git a/ext/date/tests/idate_variation7.phpt b/ext/date/tests/idate_variation7.phpt index a5e3a2ee7d..52ade58d9d 100644 --- a/ext/date/tests/idate_variation7.phpt +++ b/ext/date/tests/idate_variation7.phpt @@ -23,9 +23,9 @@ var_dump( idate($format, $timestamp) ); --EXPECTF-- *** Testing idate() : usage variation *** -Strict Standards: idate(): It is not safe to rely on the system's timezone settings.%s +Warning: idate(): It is not safe to rely on the system's timezone settings.%s int(2009) -Strict Standards: idate(): It is not safe to rely on the system's timezone settings.%s +Warning: idate(): It is not safe to rely on the system's timezone settings.%s int(2008) ===DONE=== diff --git a/ext/date/tests/timestamp-in-dst.phpt b/ext/date/tests/timestamp-in-dst.phpt index 24d1dddeb6..7078d2e3df 100644 --- a/ext/date/tests/timestamp-in-dst.phpt +++ b/ext/date/tests/timestamp-in-dst.phpt @@ -4,7 +4,7 @@ Format timestamp in DST test date.timezone=CEST --FILE-- format( 'c' ) ); ?> --EXPECT--