]> granicus.if.org Git - php/commitdiff
- Improve error messages a bit.
authorDerick Rethans <derick@php.net>
Wed, 19 Oct 2005 07:21:35 +0000 (07:21 +0000)
committerDerick Rethans <derick@php.net>
Wed, 19 Oct 2005 07:21:35 +0000 (07:21 +0000)
ext/date/php_date.c

index 5f581060c688446f0baa8d26d70918476ca6acd7..754311e6b130335f7094173d88d75c140a9cdd54 100644 (file)
@@ -328,7 +328,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
@@ -347,7 +347,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 */
@@ -361,13 +361,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";
 }