derick Sun May 3 19:09:23 2009 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/main main.c Log: - MFH: Fixed bug #45191 (error_log ignores date.timezone php.ini val when setting logging timestamps). http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1486&r2=1.2027.2.547.2.1487&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1486 php-src/NEWS:1.2027.2.547.2.1487 --- php-src/NEWS:1.2027.2.547.2.1486 Sun May 3 18:22:59 2009 +++ php-src/NEWS Sun May 3 19:09:22 2009 @@ -69,6 +69,8 @@ (Derick, Mike Sullivan) - Fixed bug #45799 (imagepng() crashes on empty image). (Martin McNickle, Takeshi Abe) +- Fixed bug #45191 (error_log ignores date.timezone php.ini val when + setting logging timestamps). (Derick) - Fixed bug #43073 (TrueType bounding box is wrong for angle<>0). (Martin McNickle) - Fixed bug #38805 (PDO truncates text from SQL Server text data type http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.68&r2=1.640.2.23.2.69&diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.640.2.23.2.68 php-src/main/main.c:1.640.2.23.2.69 --- php-src/main/main.c:1.640.2.23.2.68 Wed Dec 31 11:17:47 2008 +++ php-src/main/main.c Sun May 3 19:09:23 2009 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.640.2.23.2.68 2008/12/31 11:17:47 sebastian Exp $ */ +/* $Id: main.c,v 1.640.2.23.2.69 2009/05/03 19:09:23 derick Exp $ */ /* {{{ includes */ @@ -473,7 +473,6 @@ PHPAPI void php_log_err(char *log_message TSRMLS_DC) { int fd = -1; - char error_time_str[128]; struct tm tmbuf; time_t error_time; @@ -489,14 +488,17 @@ if (fd != -1) { char *tmp; int len; + char *error_time_str; + time(&error_time); - strftime(error_time_str, sizeof(error_time_str), "%d-%b-%Y %H:%M:%S", php_localtime_r(&error_time, &tmbuf)); + error_time_str = php_format_date("d-M-Y H:i:s", 11, error_time, 1 TSRMLS_CC); len = spprintf(&tmp, 0, "[%s] %s%s", error_time_str, log_message, PHP_EOL); #ifdef PHP_WIN32 php_flock(fd, 2); #endif write(fd, tmp, len); efree(tmp); + efree(error_time_str); close(fd); return; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php