Keep message language and numeric formatting unchanged.
Use Japanese locale rules only for month names, weekday names, and date/time formats.
Which variable should be set?
LC_TIME controls date and time formatting, including month and weekday names.
Detailed explanation
LC_TIME=ja_JP.UTF-8Correct. LC_TIME changes date and time localization.
Correct. LC_TIME changes date and time localization.
LC_MESSAGES=ja_JP.UTF-8Incorrect. LC_MESSAGES controls program messages.
Incorrect. LC_MESSAGES controls program messages.
LC_NUMERIC=ja_JP.UTF-8Incorrect. LC_NUMERIC controls numeric formatting.
Incorrect. LC_NUMERIC controls numeric formatting.
LC_COLLATE=ja_JP.UTF-8Incorrect. LC_COLLATE controls collation and sorting.
Incorrect. LC_COLLATE controls collation and sorting.
Try it yourself
An example you can run in a temporary verification environment.
LC_TIME=C date '+%A %B'Expected result
英語の曜日名と月名Key points
- LC_TIME is date/time
- LC_MESSAGES is messages
- Change one category
Notes
- Environment: POSIX date / 子プロセス環境だけ変更
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.