Skip to content

Commit cc2e37c

Browse files
authored
Merge pull request #9583 from ruby/endpoint-spec-time-new
Parse `created_at` via `Time.new` instead of `Time.iso8601`
2 parents 88057ed + d14e3ce commit cc2e37c

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

bundler/lib/bundler/endpoint_specification.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,10 @@ def parse_metadata(data)
165165
when "created_at"
166166
value = v.is_a?(Array) ? v.last : v
167167
if value.is_a?(String)
168-
require "time"
169-
begin
170-
@created_at = Time.iso8601(value)
168+
@created_at = begin
169+
Time.new(value)
171170
rescue ArgumentError
172-
@created_at = nil
171+
nil
173172
end
174173
end
175174
end

0 commit comments

Comments
 (0)