nvim: plugin/epoch-converter: Use UTC time zone

This commit is contained in:
Sanchayan Maity 2023-09-14 14:17:47 +05:30
parent 48e6b25a84
commit 39c8f2890a
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -1,12 +1,12 @@
function GetHumanReadableDate()
normal! `<v`>y
let date = trim(system("date -d @" . trim(shellescape(@@))))
let date = trim(system("date -u -d @" . trim(shellescape(@@))))
echo date
endfunction
function GetEpochDate()
normal! `<v`>y
let date = trim(system("date -d " . trim(shellescape(@@)) . ' "+%s"'))
let date = trim(system("date -u -d " . trim(shellescape(@@)) . ' "+%s"'))
echo date
endfunction