Skip to content

Commit d14e3ce

Browse files
hsbtclaude
andcommitted
Parse created_at via Time.new instead of Time.iso8601
A full ISO-8601 timestamp with seconds (the format compact index v2 sends, e.g. 2026-05-30T08:52:10Z) is recognised by Time.new directly, so we can drop the require "time" and the indirection through Time.iso8601 while keeping the same ArgumentError fallback for malformed input. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 88057ed commit d14e3ce

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)