#define DATE_FORMAT_RFC1123 "D, d M Y H:i:s T"
#define DATE_FORMAT_RFC2822 "D, d M Y H:i:s O"
+#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 " \
+ "date_default_timezone_set() function. "
+
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(date)
{
tzid = "UTC";
}
- php_error_docref(NULL TSRMLS_CC, E_STRICT, "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. We select '%s' for '%s/%.1f/%s' instead.", tzid, ta->tm_zone, (float) (ta->tm_gmtoff / 3600), ta->tm_isdst ? "DST" : "no DST");
+ php_error_docref(NULL TSRMLS_CC, E_STRICT, DATE_TZ_ERRMSG "We selected '%s' for '%s/%.1f/%s' instead", tzid, ta->tm_zone, (float) (ta->tm_gmtoff / 3600), ta->tm_isdst ? "DST" : "no DST");
return tzid;
}
#endif
if (! tzid) {
tzid = "UTC";
}
- php_error_docref(NULL TSRMLS_CC, E_STRICT, "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. We select '%s' for '%.1f/no DST' instead.", tzid, ((tzi.Bias + tzi.StandardBias) / -60.0));
+ 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));
break;
/* DST in effect */
if (! tzid) {
tzid = "UTC";
}
- php_error_docref(NULL TSRMLS_CC, E_STRICT, "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. We select '%s' for '%.1f/DST' instead.", tzid, ((tzi.Bias + tzi.DaylightBias) / -60.0));
+ 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));
break;
}
return tzid;
}
#endif
/* Fallback to UTC */
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "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. We have to select 'UTC' because your platform doesn't provide functionality for the guessing algorithm");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, DATE_TZ_ERRMSG "We had to select 'UTC' because your platform doesn't provide functionality for the guessing algorithm");
return "UTC";
}
tz = guess_timezone(TSRMLS_C);
tzi = php_date_parse_tzfile(tz, DATE_TIMEZONEDB TSRMLS_CC);
if (! tzi) {
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Timezone setting (date.timezone) or TZ environment variable contains an unknown timezone.");
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Timezone setting (date.timezone) or TZ environment variable contains an unknown timezone");
tzi = php_date_parse_tzfile("UTC", DATE_TIMEZONEDB TSRMLS_CC);
if (! tzi) {
now->h = hou;
break;
default:
- php_error_docref(NULL TSRMLS_CC, E_STRICT, "You should be using the time() function instead.");
+ php_error_docref(NULL TSRMLS_CC, E_STRICT, "You should be using the time() function instead");
}
/* Update the timestamp */
if (gmt) {
}
/* Support for the deprecated is_dst parameter */
if (dst != -1) {
- php_error_docref(NULL TSRMLS_CC, E_STRICT, "The is_dst parameter is deprecated.");
+ php_error_docref(NULL TSRMLS_CC, E_STRICT, "The is_dst parameter is deprecated");
if (gmt) {
/* GMT never uses DST */
if (dst == 1) {
echo date('e'), "\n";
?>
--EXPECTF--
-Strict Standards: date_default_timezone_get(): It is not safe to rely on the systems timezone settings, please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We use 'Europe/London' for 'UTC/0.0/no DST' instead. in %sdate_default_timezone_get-1.php on line 3
+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. We selected 'Europe/London' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-1.php on line 3
Europe/London
-Strict Standards: date(): It is not safe to rely on the systems timezone settings, please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We use 'Europe/London' for 'UTC/0.0/no DST' instead. in %sdate_default_timezone_get-1.php on line 4
+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. We selected 'Europe/London' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-1.php on line 4
Europe/London
echo date(DATE_ISO8601, $date4), "\n";
?>
--EXPECTF--
-Strict Standards: strtotime(): It is not safe to rely on the systems timezone settings, please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We use 'Europe/London' 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. We selected 'Europe/London' 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 systems timezone settings, please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We use 'Europe/London' for 'UTC/0.0/no DST' instead. in %sdate_default_timezone_set-1.php on line 4
+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. We selected 'Europe/London' 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-12T02:00:00-0500