mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 08:28:34 +00:00
vim-patch:8.1.1725: MS-Windows: E325 message may use incorrect date format
Problem: MS-Windows: E325 message may use incorrect date format.
Solution: Convert strftime() result to 'encoding'. Also make the message
translatable. (Ken Takata, closes vim/vim#4685, closes vim/vim#4681)
663bbc09ba
This commit is contained in:
@@ -172,10 +172,11 @@ char *os_ctime_r(const time_t *restrict clock, char *restrict result,
|
|||||||
struct tm *clock_local_ptr = os_localtime_r(clock, &clock_local);
|
struct tm *clock_local_ptr = os_localtime_r(clock, &clock_local);
|
||||||
// MSVC returns NULL for an invalid value of seconds.
|
// MSVC returns NULL for an invalid value of seconds.
|
||||||
if (clock_local_ptr == NULL) {
|
if (clock_local_ptr == NULL) {
|
||||||
snprintf(result, result_len, "%s\n", _("(Invalid)"));
|
xstrlcpy(result, _("(Invalid)"), result_len);
|
||||||
} else {
|
} else {
|
||||||
strftime(result, result_len, "%a %b %d %H:%M:%S %Y\n", clock_local_ptr);
|
strftime(result, result_len, _("%a %b %d %H:%M:%S %Y"), clock_local_ptr);
|
||||||
}
|
}
|
||||||
|
xstrlcat(result, "\n", result_len);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user