To: vim_dev@googlegroups.com Subject: Patch 8.2.0949 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0949 Problem: Strptime() does not use DST. Solution: Set the tm_isdst field to -1. (Tomáš Janoušek, closes #6230) Files: src/time.c, src/testdir/test_functions.vim *** ../vim-8.2.0948/src/time.c 2020-04-12 19:37:13.526297236 +0200 --- src/time.c 2020-06-10 16:51:19.617574959 +0200 *************** *** 314,319 **** --- 314,320 ---- char_u *enc; CLEAR_FIELD(tmval); + tmval.tm_isdst = -1; fmt = tv_get_string(&argvars[0]); str = tv_get_string(&argvars[1]); *** ../vim-8.2.0948/src/testdir/test_functions.vim 2020-06-10 15:55:33.355088114 +0200 --- src/testdir/test_functions.vim 2020-06-10 16:51:19.617574959 +0200 *************** *** 280,285 **** --- 280,289 ---- 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", '')) *** ../vim-8.2.0948/src/version.c 2020-06-10 16:39:27.359613652 +0200 --- src/version.c 2020-06-10 16:52:53.213301674 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 949, /**/ -- Proverb: A nightingale that forgets the lyrics is a hummingbird. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///