From 269a271a108e498a102d88712aa66e3d4e7b82fe Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 28 Aug 2020 09:49:49 -0400 Subject: 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) https://github.com/vim/vim/commit/663bbc09babea1ff8dfa7ccd58801ac9219fc2b2 --- src/nvim/os/time.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/nvim/os/time.c') diff --git a/src/nvim/os/time.c b/src/nvim/os/time.c index 346e40e02e..ddc5d3ec84 100644 --- a/src/nvim/os/time.c +++ b/src/nvim/os/time.c @@ -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); // MSVC returns NULL for an invalid value of seconds. if (clock_local_ptr == NULL) { - snprintf(result, result_len, "%s\n", _("(Invalid)")); + xstrlcpy(result, _("(Invalid)"), result_len); } 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; } -- cgit