summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2005-10-19 07:22:20 +0000
committerDerick Rethans <derick@php.net>2005-10-19 07:22:20 +0000
commit6aed41421ef2a21b8a19d10cce782b83ad80209a (patch)
tree439f894265ed48219c2e29b3aa4223b9a915eb61
parente5928942ace819e4e73fba817542efde84f0de68 (diff)
downloadphp-git-6aed41421ef2a21b8a19d10cce782b83ad80209a.tar.gz
- MFH: Improved error messages a bit.
-rw-r--r--ext/date/php_date.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index b4acfd4dad..6aab511bf2 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -326,7 +326,7 @@ static char* guess_timezone(TSRMLS_D)
tzid = "UTC";
}
- php_error_docref(NULL TSRMLS_CC, E_STRICT, "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 '%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, "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");
return tzid;
}
#endif
@@ -345,7 +345,7 @@ php_win_std_time:
if (! tzid) {
tzid = "UTC";
}
- php_error_docref(NULL TSRMLS_CC, E_STRICT, "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 '%s' for '%.1f/no DST' instead.", tzid, ((tzi.Bias + tzi.StandardBias) / -60.0));
+ 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));
break;
/* DST in effect */
@@ -359,13 +359,14 @@ php_win_std_time:
if (! tzid) {
tzid = "UTC";
}
- php_error_docref(NULL TSRMLS_CC, E_STRICT, "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 '%s' for '%.1f/DST' instead.", tzid, ((tzi.Bias + tzi.DaylightBias) / -60.0));
+ 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));
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");
return "UTC";
}