diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-10 16:54:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-10 16:54:13 +0200 |
commit | ea1233fccf4f52f2b4eaab3788a087878d1336fc (patch) | |
tree | 30b56ad601bce89464f113e07fbe7d6e40d403a2 /src/testdir/test_functions.vim | |
parent | d281b7c227bc4c78813fdc297ccee4b2cad7e605 (diff) | |
download | vim-git-ea1233fccf4f52f2b4eaab3788a087878d1336fc.tar.gz |
patch 8.2.0949: strptime() does not use DSTv8.2.0949
Problem: Strptime() does not use DST.
Solution: Set the tm_isdst field to -1. (Tomáš Janoušek, closes #6230)
Diffstat (limited to 'src/testdir/test_functions.vim')
-rw-r--r-- | src/testdir/test_functions.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index f83264b48..0a4e94e0a 100644 --- 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", '')) |