diff options
| author | Bob Weinand <bobwei9@hotmail.com> | 2015-01-27 01:55:19 +0100 |
|---|---|---|
| committer | Bob Weinand <bobwei9@hotmail.com> | 2015-02-27 23:27:09 +0100 |
| commit | b22caa81ee2797572279fc9aff0918c01f708de5 (patch) | |
| tree | 90f03460a8b5f479df5e0b12974987cbb85fb9e3 /ext/date/php_date.c | |
| parent | ffe47393abdbe54bfcc892176bab3dba55325cda (diff) | |
| download | php-git-b22caa81ee2797572279fc9aff0918c01f708de5.tar.gz | |
Remove useless date warning
Diffstat (limited to 'ext/date/php_date.c')
| -rw-r--r-- | ext/date/php_date.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index fbc4f85205..ffdea3d090 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -827,13 +827,6 @@ PHP_RSHUTDOWN_FUNCTION(date) */ #define DATE_FORMAT_COOKIE "l, d-M-Y H:i:s T" -#define DATE_TZ_ERRMSG \ - "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. " - #define SUNFUNCS_RET_TIMESTAMP 0 #define SUNFUNCS_RET_STRING 1 #define SUNFUNCS_RET_DOUBLE 2 @@ -954,7 +947,9 @@ static PHP_INI_MH(OnUpdate_date_timezone) DATEG(timezone_valid) = 0; if (stage == PHP_INI_STAGE_RUNTIME) { if (!timelib_timezone_id_is_valid(DATEG(default_timezone), DATE_TIMEZONEDB)) { - php_error_docref(NULL, E_WARNING, DATE_TZ_ERRMSG); + if (DATEG(default_timezone) && *DATEG(default_timezone)) { + php_error_docref(NULL, E_WARNING, "Invalid date.timezone value '%s', we selected the timezone 'UTC' for now.", DATEG(default_timezone)); + } } else { DATEG(timezone_valid) = 1; } @@ -994,7 +989,6 @@ static char* guess_timezone(const timelib_tzdb *tzdb) return DATEG(default_timezone); } /* Fallback to UTC */ - php_error_docref(NULL, E_WARNING, DATE_TZ_ERRMSG "We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone."); return "UTC"; } |
