derick Tue Jan 27 13:48:10 2009 UTC
Modified files: (Branch: PHP_5_3) /php-src/ext/date php_date.c /php-src/ext/date/tests date_default_timezone_get-1.phpt date_default_timezone_get-2.phpt date_default_timezone_set-1.phpt timestamp-in-dst.phpt Log: - MFH: Elevate no-tz set warning from E_STRICT to E_WARNING. #- [DOC]
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.64&r2=1.43.2.45.2.51.2.65&diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.64 php-src/ext/date/php_date.c:1.43.2.45.2.51.2.65 --- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.64 Wed Dec 31 11:15:35 2008 +++ php-src/ext/date/php_date.c Tue Jan 27 13:48:10 2009 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.c,v 1.43.2.45.2.51.2.64 2008/12/31 11:15:35 sebastian Exp $ */ +/* $Id: php_date.c,v 1.43.2.45.2.51.2.65 2009/01/27 13:48:10 derick Exp $ */ #include "php.h" #include "php_streams.h" @@ -707,8 +707,8 @@ #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. " @@ -845,7 +845,7 @@ 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 @@ -864,7 +864,7 @@ 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 */ @@ -878,7 +878,7 @@ 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; http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_default_timezone_get-1.phpt?r1=1.2.2.6&r2=1.2.2.6.4.1&diff_format=u Index: php-src/ext/date/tests/date_default_timezone_get-1.phpt diff -u php-src/ext/date/tests/date_default_timezone_get-1.phpt:1.2.2.6 php-src/ext/date/tests/date_default_timezone_get-1.phpt:1.2.2.6.4.1 --- php-src/ext/date/tests/date_default_timezone_get-1.phpt:1.2.2.6 Tue Dec 20 19:54:10 2005 +++ php-src/ext/date/tests/date_default_timezone_get-1.phpt Tue Jan 27 13:48:10 2009 @@ -9,8 +9,8 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_default_timezone_get-2.phpt?r1=1.2.2.2.4.1&r2=1.2.2.2.4.2&diff_format=u Index: php-src/ext/date/tests/date_default_timezone_get-2.phpt diff -u php-src/ext/date/tests/date_default_timezone_get-2.phpt:1.2.2.2.4.1 php-src/ext/date/tests/date_default_timezone_get-2.phpt:1.2.2.2.4.2 --- php-src/ext/date/tests/date_default_timezone_get-2.phpt:1.2.2.2.4.1 Sat Jan 10 00:50:45 2009 +++ php-src/ext/date/tests/date_default_timezone_get-2.phpt Tue Jan 27 13:48:10 2009 @@ -6,5 +6,5 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_default_timezone_set-1.phpt?r1=1.1.2.8.4.1&r2=1.1.2.8.4.2&diff_format=u Index: php-src/ext/date/tests/date_default_timezone_set-1.phpt diff -u php-src/ext/date/tests/date_default_timezone_set-1.phpt:1.1.2.8.4.1 php-src/ext/date/tests/date_default_timezone_set-1.phpt:1.1.2.8.4.2 --- php-src/ext/date/tests/date_default_timezone_set-1.phpt:1.1.2.8.4.1 Sat Jan 10 00:50:45 2009 +++ php-src/ext/date/tests/date_default_timezone_set-1.phpt Tue Jan 27 13:48:10 2009 @@ -16,9 +16,9 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/timestamp-in-dst.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/date/tests/timestamp-in-dst.phpt diff -u php-src/ext/date/tests/timestamp-in-dst.phpt:1.1.2.2 php-src/ext/date/tests/timestamp-in-dst.phpt:1.1.2.3 --- php-src/ext/date/tests/timestamp-in-dst.phpt:1.1.2.2 Mon Mar 31 09:11:30 2008 +++ php-src/ext/date/tests/timestamp-in-dst.phpt Tue Jan 27 13:48:10 2009 @@ -4,7 +4,7 @@ date.timezone=CEST --FILE-- <?php -error_reporting(E_ALL); // hide e_strict warning about timezones +error_reporting(E_ALL & ~E_WARNING); // hide e_warning warning about timezones var_dump( date_create( '@1202996091' )->format( 'c' ) ); ?> --EXPECT--