diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-28 09:49:49 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-30 21:12:25 -0400 |
commit | 269a271a108e498a102d88712aa66e3d4e7b82fe (patch) | |
tree | 6345fa3981d3f3c9ce2f8ea05da7ebf4527cd872 | |
parent | b3f5083b8dc6469e3becd37eb9deb01eb1c33f5d (diff) | |
download | rneovim-269a271a108e498a102d88712aa66e3d4e7b82fe.tar.gz rneovim-269a271a108e498a102d88712aa66e3d4e7b82fe.tar.bz2 rneovim-269a271a108e498a102d88712aa66e3d4e7b82fe.zip |
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
-rw-r--r-- | src/nvim/os/time.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; } |