0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.0949: strptime() does not use DST

Problem:    Strptime() does not use DST.
Solution:   Set the tm_isdst field to -1. (Tomáš Janoušek, closes #6230)
This commit is contained in:
Bram Moolenaar
2020-06-10 16:54:13 +02:00
parent d281b7c227
commit ea1233fccf
3 changed files with 7 additions and 0 deletions

View File

@@ -280,6 +280,10 @@ func Test_strptime()
call assert_equal(1484653763, strptime('%Y-%m-%d %T', '2017-01-17 11:49:23'))
" Force DST and check that it's considered
let $TZ = 'WINTER0SUMMER,J1,J365'
call assert_equal(1484653763 - 3600, strptime('%Y-%m-%d %T', '2017-01-17 11:49:23'))
call assert_fails('call strptime()', 'E119:')
call assert_fails('call strptime("xxx")', 'E119:')
call assert_equal(0, strptime("%Y", ''))