]> granicus.if.org Git - php/commitdiff
- Elevate no-tz setting made from E_STRICT to E_WARNING.
authorDerick Rethans <derick@php.net>
Tue, 27 Jan 2009 13:44:38 +0000 (13:44 +0000)
committerDerick Rethans <derick@php.net>
Tue, 27 Jan 2009 13:44:38 +0000 (13:44 +0000)
#- [DOC]

ext/date/php_date.c
ext/date/tests/date_default_timezone_get-1.phpt
ext/date/tests/date_default_timezone_get-2.phpt
ext/date/tests/date_default_timezone_set-1.phpt
ext/date/tests/idate_variation7.phpt
ext/date/tests/timestamp-in-dst.phpt

index 23566bc2fb3ebc1ad7f6271a42f630bb67194531..6abef40c47c1dd79de217022a1d6c0603406adef 100644 (file)
@@ -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;
index b6494658e4d7c44eec637b090f51fdc49c787aab..383394a955a73cc23f47ba780ad1b88314e56a1a 100644 (file)
@@ -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
index 73013a76267f6a4724380eeeecedddd82ed7b70e..e52dc14f727e0bf194ef575350b881aa714bc146 100644 (file)
@@ -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
index 3c7a9aa4d6a1e39b134827d6130b19b5dead648e..c6a6daf7a8421d8cd4426b764a8df45dbcec4931 100644 (file)
@@ -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
index a5e3a2ee7dc7c58fe2bda19dd4c5fa174c56131a..52ade58d9d8927ef6e2274af067404a71a3fbaae 100644 (file)
@@ -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===
index 24d1dddeb68c6c79a490a8c8dec061c1b7b331da..7078d2e3df4ed177d5f160d26cd78c56dd6da669 100644 (file)
@@ -4,7 +4,7 @@ Format timestamp in DST test
 date.timezone=CEST
 --FILE--
 <?php
-error_reporting(E_ALL & ~E_STRICT); // hide e_strict warning about timezones
+error_reporting(E_ALL & ~E_WARNING); // hide warning warning about timezones
 var_dump( date_create( '@1202996091' )->format( 'c' ) );
 ?>
 --EXPECT--