php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23871 error_log() with finnish setlocale() produces invalid timestamp
Submitted: 2003-05-29 07:04 UTC Modified: 2003-05-29 09:39 UTC
From: toni dot viemero at iki dot fi Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.3.2 OS: Debian Woody
Private report: No CVE-ID: None
 [2003-05-29 07:04 UTC] toni dot viemero at iki dot fi
error_log() and setlocale() with finnish locales has extra
space after abbreviated month name, making error log
"unreadable".

.htaccess in docroot has log_errors and error_log set:
php_flag log_errors On
php_value error_log /tmp/php.error_log

test.php:
<?php
setlocale(LC_ALL, 'fi_FI');
error_log("foo");

from php.error_log:
[29-touko -2003 14:51:49] foo

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-29 09:19 UTC] michael dot mauch at gmx dot de
I can see that same extra space if I run "date" on the command line:

% LC_ALL=fi_FI date +%d-%b-%Y
29-touko -2003

It's the same on Debian and on SuSE.

Ceterum censeo: I vote for changing that "home-grown" date format to the ISO-8601 format (%Y-%m-%d).
 [2003-05-29 09:39 UTC] derick@php.net
If it also happens on the shell, it's not a bug in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 12:01:32 2024 UTC