Times with timezones return incorrect wday and yday
The timezone support added to Time in Ruby 2.6 does not appear to handle wday and yday.
I don't know what the most appropriate fix is, but looking at time.c and the commit which introduced the timezone feature it looks like
vtm->yday are both set by
vtm_add_offset, and that isn't called with the new block of code which handles the timezone.
I've attached a patch to the tests and specs which demonstrates the bug.
Updated by timcraft (Tim Craft) 29 days ago
$ irb -r tzinfo irb(main):001:0> Time.new(2020, 1, 1, 0, 0, 0, TZInfo::Timezone.get('America/New_York')).wday => 7 irb(main):002:0> Time.new(2020, 1, 1, 0, 0, 0, TZInfo::Timezone.get('America/New_York')).yday => 0
(The wday should be 3, and the yday should be 1.)