diff options
| author | KOBAYASHI Shuji <[email protected]> | 2019-07-31 19:20:03 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2019-07-31 20:34:27 +0900 |
| commit | 5116789aa0abcf731aaad883ea99d79844b66a85 (patch) | |
| tree | 53c5f6af8e4b6a5c25fa1281cd1a4404a90ca062 /mrbgems/mruby-time/test | |
| parent | 96ac49b75b5981c7b286da8ef60236de5412d342 (diff) | |
| download | mruby-5116789aa0abcf731aaad883ea99d79844b66a85.tar.gz mruby-5116789aa0abcf731aaad883ea99d79844b66a85.zip | |
Fix UTC offset representation in `Time#to_s` on some environments; ref #4604
Use own implementation to calculate UTC offset on Visual Studio 2015 or
earlier or MinGW because `strftime("%z")` on these environments does not
conform C99.
Diffstat (limited to 'mrbgems/mruby-time/test')
| -rw-r--r-- | mrbgems/mruby-time/test/time.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mrbgems/mruby-time/test/time.rb b/mrbgems/mruby-time/test/time.rb index f59e27bc1..be1de7bc6 100644 --- a/mrbgems/mruby-time/test/time.rb +++ b/mrbgems/mruby-time/test/time.rb @@ -239,7 +239,8 @@ assert('Time#to_s') do end assert('Time#inspect') do - assert_match("2013-10-28 16:27:48 [^U]*", Time.local(2013,10,28,16,27,48).inspect) + assert_match("2013-10-28 16:27:48 [+-][0-9][0-9][0-9][0-9]", + Time.local(2013,10,28,16,27,48).inspect) end assert('day of week methods') do |
