From: yuuji.yaginuma@... Date: 2018-12-20T03:29:14+00:00 Subject: [ruby-core:90627] [Ruby trunk Bug#15439] Time object's zone generated by Time.getlocal returns a strange value Issue #15439 has been reported by y-yagi (Yuji Yaginuma). ---------------------------------------- Bug #15439: Time object's zone generated by Time.getlocal returns a strange value https://bugs.ruby-lang.org/issues/15439 * Author: y-yagi (Yuji Yaginuma) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.6.0dev (2018-12-17 trunk 66427) [x86_64-linux] * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- Time object's zone generated by Time.getlocal returns a strange value in Ruby 2.6 ``` $ ruby -v -e 'p Time.new.utc.getlocal(0).zone; p Time.new.utc.getlocal(0).utc? ruby 2.6.0dev (2018-12-17 trunk 66427) [x86_64-linux] "UTC" false ``` Since `utc?` is false, I think that it is wrong that the zone becomes "UTC", what about it? Nil was returning until Ruby 2.5. ``` ruby -v -e 'p Time.new.utc.getlocal(0).zone; p Time.new.utc.getlocal(0).utc?' ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux] nil false ``` -- https://bugs.ruby-lang.org/ Unsubscribe: