mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merge revision(s) f4be7a510e
:
Added tests for Time#getlocal with UTC offset --- test/ruby/test_time.rb | 8 ++++++++ 1 file changed, 8 insertions(+)
This commit is contained in:
parent
db80be3deb
commit
5501e1038e
2 changed files with 11 additions and 3 deletions
|
@ -1212,6 +1212,14 @@ class TestTime < Test::Unit::TestCase
|
|||
}
|
||||
end
|
||||
|
||||
def test_getlocal_utc_offset
|
||||
t = Time.gm(2000)
|
||||
assert_equal [00, 30, 21, 31, 12, 1999], t.getlocal("-02:30").to_a[0, 6]
|
||||
assert_equal [00, 00, 9, 1, 1, 2000], t.getlocal("+09:00").to_a[0, 6]
|
||||
assert_equal [20, 29, 21, 31, 12, 1999], t.getlocal("-02:30:40").to_a[0, 6]
|
||||
assert_equal [35, 10, 9, 1, 1, 2000], t.getlocal("+09:10:35").to_a[0, 6]
|
||||
end
|
||||
|
||||
def test_getlocal_nil
|
||||
now = Time.now
|
||||
now2 = nil
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
|
||||
#define RUBY_VERSION_TEENY 0
|
||||
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
|
||||
#define RUBY_PATCHLEVEL 0
|
||||
#define RUBY_PATCHLEVEL 1
|
||||
|
||||
#define RUBY_RELEASE_YEAR 2021
|
||||
#define RUBY_RELEASE_MONTH 1
|
||||
#define RUBY_RELEASE_DAY 24
|
||||
#define RUBY_RELEASE_MONTH 2
|
||||
#define RUBY_RELEASE_DAY 1
|
||||
|
||||
#include "ruby/version.h"
|
||||
|
||||
|
|
Loading…
Reference in a new issue