When you 'improve' the texts, try keeping the tests from failing too.

    --Jani


On Wed, 19 Oct 2005, Derick Rethans wrote:


derick          Wed Oct 19 03:21:35 2005 EDT

 Modified files:
   /php-src/ext/date    php_date.c
 Log:
 - Improve error messages a bit.


http://cvs.php.net/diff.php/php-src/ext/date/php_date.c?r1=1.63&r2=1.64&ty=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.63 php-src/ext/date/php_date.c:1.64
--- php-src/ext/date/php_date.c:1.63    Sat Oct 15 14:14:40 2005
+++ php-src/ext/date/php_date.c Wed Oct 19 03:21:35 2005
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */

-/* $Id: php_date.c,v 1.63 2005/10/15 18:14:40 derick Exp $ */
+/* $Id: php_date.c,v 1.64 2005/10/19 07:21:35 derick Exp $ */

#include "php.h"
#include "php_streams.h"
@@ -328,7 +328,7 @@
                        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 @@
                                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 @@
                                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";
}




--
Give me your money at @ <http://pecl.php.net/wishlist.php/sniper>
Donating money may make me happier and friendlier for a limited period!
Death to all 4 letter abbreviations starting with P!

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to