mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
[Bug #20797] Check seconds in UTC offset as well as minutes
This commit is contained in:
parent
0641951e7b
commit
9611c619ac
Notes:
git
2024-10-14 05:24:55 +00:00
3 changed files with 16 additions and 3 deletions
|
@ -152,6 +152,18 @@ class TestTime < Test::Unit::TestCase
|
|||
assert_raise_with_message(ArgumentError, /can't parse/) {
|
||||
Time.new("2020-12-02 00:00:00 ")
|
||||
}
|
||||
assert_raise_with_message(ArgumentError, /utc_offset/) {
|
||||
Time.new("2020-12-25 00:00:00 +0960")
|
||||
}
|
||||
assert_raise_with_message(ArgumentError, /utc_offset/) {
|
||||
Time.new("2020-12-25 00:00:00 +09:60")
|
||||
}
|
||||
assert_raise_with_message(ArgumentError, /utc_offset/) {
|
||||
Time.new("2020-12-25 00:00:00 +090060")
|
||||
}
|
||||
assert_raise_with_message(ArgumentError, /utc_offset/) {
|
||||
Time.new("2020-12-25 00:00:00 +09:00:60")
|
||||
}
|
||||
end
|
||||
|
||||
def test_time_add()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue