Open
Description
Vital:
function! s:f() abort
let s:D = vital#vital#new().import('DateTime')
echo s:D.from_unix_time(1325441045, 9).hour()
endfunction
call s:f()
"=> 2
" ↑ I expect 3
Ruby:
p Time.at(1325441045, in: '+09:00').hour
#=> 3
How to reproduce
Set TZ
to a timezone that has DST, and during the summer season of the timezone just run the above Vim script or run DateTime spec. (e.g. TZ=America/Vancouver
on 2020-05-04)
Travis can do that easily: https://github.com/vim-jp/vital.vim/pull/739/files#diff-354f30a63fb0907d4ad57269548329e3R64
Metadata
Metadata
Assignees
Labels
No labels