Mercurial > vim
changeset 20794:2e7acc208a1f v8.2.0949
patch 8.2.0949: strptime() does not use DST
Commit: https://github.com/vim/vim/commit/ea1233fccf4f52f2b4eaab3788a087878d1336fc
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 10 16:54:13 2020 +0200
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 https://github.com/vim/vim/issues/6230)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 10 Jun 2020 17:00:04 +0200 |
parents | d48f8bb5f34e |
children | 34febcaa0336 |
files | src/testdir/test_functions.vim src/time.c src/version.c |
diffstat | 3 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -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", ''))