diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-10-07 14:12:30 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-10-07 14:41:31 +0900 |
commit | 1b7c5c394f14e1a7aebbaf14b7d681733d1d97c2 (patch) | |
tree | 42c55fdbdf1f0d5d57fa6562f8986487bfe5d4df /test/date | |
parent | fc218e597709e14634535c5836349f7f89a75dc2 (diff) |
[ruby/date] Fix misplaced time zone offset checks
https://github.com/ruby/date/commit/d21c69450a
Diffstat (limited to 'test/date')
-rw-r--r-- | test/date/test_date_strptime.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/date/test_date_strptime.rb b/test/date/test_date_strptime.rb index 521bf92916..4efe1a47d0 100644 --- a/test/date/test_date_strptime.rb +++ b/test/date/test_date_strptime.rb @@ -296,6 +296,11 @@ class TestDateStrptime < Test::Unit::TestCase assert_not_nil(Date._strptime('Januari', '%B')) assert_nil(Date._strptime('Sundai,', '%A,')) assert_nil(Date._strptime('Januari,', '%B,')) + + assert_nil(Date._strptime('+24:00', '%Z')[:offset]) + assert_nil(Date._strptime('+23:60', '%Z')[:offset]) + assert_nil(Date._strptime('+23:00:60', '%Z')[:offset]) + assert_nil(Date._strptime('+23:00:60', '%Z')[:offset]) end def test_strptime |