vim-jp / vim-jp/vital.vim

DateTime.from_unix_time() returns 1 hour earlier in the summer season

Open
#740 0 comments 0 reactions 1 assignee View on GitHub

@thinca is already working on this.

Since May 4, 2020.

Dominant language
Vim Script
Stars
587
Forks
64
Avg merge
2d 8h
Merged PRs (30d)
1

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.