vim:keys: Use RFC 3339 when converting unix times

Use a format conforming to RFC 3339 instead of following the systems
locale.
This commit is contained in:
2022-08-25 01:14:39 +02:00
parent a38ac0e738
commit 73aa0e9752

View File

@@ -203,5 +203,5 @@ nmap Q gqap
" Convert Unix timestamp to human readable
" Mnemonic: "Unix timestamp convert" with pun to UTC
nnoremap <leader>utc ciw<C-r>=strftime("%c", @")<CR><Esc>
nnoremap <leader>utc ciw<C-r>=strftime("%F %T", @")<CR><Esc>
vnoremap <leader>utc :s/\v(^\|[^0-9])\zs[0-9]{10}\ze([^0-9]\|$)/\=strftime("%c",submatch(0))/g<CR>