Actions
Bug #15439
closedTime object's zone generated by Time.getlocal returns a strange value
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.0dev (2018-12-17 trunk 66427) [x86_64-linux]
Backport:
Description
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
Actions
Like0
Like0Like0