Project

General

Profile

Actions

Bug #17042

closed

Times with timezones return incorrect week numbers

Added by timcraft (Tim Craft) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.8.0dev (2020-07-15 master 79d06483a8)
[ruby-core:99265]

Description

Times with timezones return incorrect week numbers from strftime. For example:

$ irb -r tzinfo
irb(main):001:0> Time.utc(2020, 7, 22, 12, 0, 0).strftime('%U %V %W')
=> "29 30 29"
irb(main):002:0> Time.new(2020, 7, 22, 12, 0, 0, TZInfo::Timezone.get('America/New_York')).strftime('%U %V %W')
=> "00 00 00"

Follow up to #17024

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0