Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed 'wrong date format' warning #41

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Datastore/Sources/DatastoreRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class GoogleCloudDatastoreRequest: GoogleCloudAPIRequest {
self.project = project
self.eventLoop = eventLoop
let dateFormatter = DateFormatter()

dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
dateFormatter.calendar = Calendar(identifier: .iso8601)
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
self.responseDecoder.dateDecodingStrategy = .formatted(dateFormatter)
}

Expand Down
3 changes: 2 additions & 1 deletion PubSub/Sources/PubSubRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class GoogleCloudPubSubRequest: GoogleCloudAPIRequest {
self.eventLoop = eventLoop

let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
dateFormatter.calendar = Calendar(identifier: .iso8601)
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
self.responseDecoder.dateDecodingStrategy = .formatted(dateFormatter)
}

Expand Down
3 changes: 2 additions & 1 deletion SecretManager/Sources/SecretManagerRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class GoogleCloudSecretManagerRequest: GoogleCloudAPIRequest {
self.eventLoop = eventLoop
let dateFormatter = DateFormatter()

dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
dateFormatter.calendar = Calendar(identifier: .iso8601)
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
self.responseDecoder.dateDecodingStrategy = .formatted(dateFormatter)
}

Expand Down
4 changes: 2 additions & 2 deletions Storage/Sources/StorageRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class GoogleCloudStorageRequest: GoogleCloudAPIRequest {
self.project = project
self.eventLoop = eventLoop
let dateFormatter = DateFormatter()

dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
dateFormatter.calendar = Calendar(identifier: .iso8601)
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
self.responseDecoder.dateDecodingStrategy = .formatted(dateFormatter)
}

Expand Down
1 change: 1 addition & 0 deletions Storage/Tests/StorageTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

4 changes: 2 additions & 2 deletions Translation/Sources/TranslationRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class GoogleCloudTranslationRequest: GoogleCloudAPIRequest {
self.project = project
self.eventLoop = eventLoop
let dateFormatter = DateFormatter()

dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
dateFormatter.calendar = Calendar(identifier: .iso8601)
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
self.responseDecoder.dateDecodingStrategy = .formatted(dateFormatter)
}

Expand Down