Project

General

Profile

Actions

Bug #17046

closed

Time#to_a yday is 0(given timezone info)

Added by S_H_ (Shun Hiraoka) over 3 years ago. Updated over 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
2.8.0dev (2020-07-23T14:44:25Z master 098e8c2873) [x86_64-linux]
[ruby-dev:50934]

Description

I interest in Time#to_a behavior(background is Bug #17042)

Tried whether yday is displayed correctly in Time #to_a.
But, yday seems to be 0 when passing the time zone.

$ ruby -v
ruby 2.8.0dev (2020-07-23T14:44:25Z master 098e8c2873) [x86_64-linux]

$ ruby -r tzinfo -e "p  Time.new(2020, 7, 22, 12, 0, 0).to_a"
[0, 0, 12, 22, 7, 2020, 3, 204, false, "JST"]

ruby -r tzinfo -e "p  Time.new(2020, 7, 22, 12, 0, 0, TZInfo::Timezone.get('America/New_York')).to_a"
[0, 0, 12, 22, 7, 2020, 7, 0, false, #<TZInfo::DataTimezone: America/New_York>]

May be must to backport to 2.6 & 2.7.

Actions #2

Updated by S_H_ (Shun Hiraoka) over 3 years ago

  • Status changed from Open to Closed

Applied in changeset git|2735da2039b9e441e41b11b606ba362db350a658.


Fix Time#to_a behavior with timezone [Bug #17046]

Actions #3

Updated by nagachika (Tomoyuki Chikanaga) over 3 years ago

  • Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN to 2.5: UNKNOWN, 2.6: REQUIRED, 2.7: REQUIRED
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0