self-reply for my old article...
I moved LC_CTYPE setting before LC_TIME setting in moodle_setlocale function like this:
if ($CFG->locale != 'tr_TR') { // To workaround a well-known PHP bug with Turkish
setlocale (LC_CTYPE, $CFG->locale);
}
setlocale (LC_TIME, $CFG->locale);
setlocale (LC_COLLATE, $CFG->locale);
This change fixed Japanese date string problem. I can't know why LC_CTYPE must be before LC_TIME. But please fix this