From f1445a4cf681e6d8176db8e91f0f1a6e8596442f Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Feb 2026 06:55:35 +0000 Subject: [PATCH] Rename TimeZone to TimeZoneInfo to fix macOS CI failure The custom TimeZone struct shadows Foundation.TimeZone, causing ambiguity when the test target imports both Foundation (via XCTest) and IPData on macOS. https://claude.ai/code/session_01PFKz7y2ynoU3uEVaGxKHYP --- Sources/IPData/Models.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/IPData/Models.swift b/Sources/IPData/Models.swift index a5cd0ed..e531a26 100644 --- a/Sources/IPData/Models.swift +++ b/Sources/IPData/Models.swift @@ -26,7 +26,7 @@ public struct IPResponse: Codable, Sendable, Equatable { public let carrier: Carrier? public let languages: [Language]? public let currency: Currency? - public let timeZone: TimeZone? + public let timeZone: TimeZoneInfo? public let threat: Threat? /// Number of API requests made in the last 24 hours. /// The API may return this as either a number or a string. @@ -76,7 +76,7 @@ public struct IPResponse: Codable, Sendable, Equatable { carrier = try c.decodeIfPresent(Carrier.self, forKey: .carrier) languages = try c.decodeIfPresent([Language].self, forKey: .languages) currency = try c.decodeIfPresent(Currency.self, forKey: .currency) - timeZone = try c.decodeIfPresent(TimeZone.self, forKey: .timeZone) + timeZone = try c.decodeIfPresent(TimeZoneInfo.self, forKey: .timeZone) threat = try c.decodeIfPresent(Threat.self, forKey: .threat) // The API returns count as either an Int or a String. if let intVal = try? c.decodeIfPresent(Int.self, forKey: .count) { @@ -171,7 +171,7 @@ public struct Currency: Codable, Sendable, Equatable { // MARK: - TimeZone /// Time zone information for the IP address location. -public struct TimeZone: Codable, Sendable, Equatable { +public struct TimeZoneInfo: Codable, Sendable, Equatable { public let name: String? public let abbr: String? public let offset: String?