diff --git a/Clocker/Preferences/App Feedback/AppFeedbackWindowController.swift b/Clocker/Preferences/App Feedback/AppFeedbackWindowController.swift index d332307..718db0f 100644 --- a/Clocker/Preferences/App Feedback/AppFeedbackWindowController.swift +++ b/Clocker/Preferences/App Feedback/AppFeedbackWindowController.swift @@ -22,6 +22,8 @@ struct AppFeedbackConstants { static let CLFeedbackAlertInformativeText = "We owe you a candy. 😇" static let CLFeedbackAlertButtonTitle = "Close" static let CLFeedbackNotEnteredErrorMessage = "Please enter some feedback." + static let CLAppFeedbackDateProperty = "date" + static let CLCaliforniaTimezoneIdentifier = "America/Los_Angeles" } class AppFeedbackWindowController: NSWindowController { @@ -156,11 +158,20 @@ class AppFeedbackWindowController: NSWindowController { AppFeedbackConstants.CLAppFeedbackFeedbackProperty: appFeedbackProperty, AppFeedbackConstants.CLOperatingSystemVersion: osVersion, AppFeedbackConstants.CLClockerVersion: versionInfo, + AppFeedbackConstants.CLAppFeedbackDateProperty: todaysDate(), ] return feedbackInfo } + private func todaysDate() -> String { + let dateFormatter = DateFormatter() + dateFormatter.dateStyle = .medium + dateFormatter.timeStyle = .short + dateFormatter.timeZone = TimeZone(identifier: AppFeedbackConstants.CLCaliforniaTimezoneIdentifier) + return dateFormatter.string(from: Date()) + } + private func sendDataToFirebase(feedbackInfo: [String: String]) { guard let identifier = serialNumber else { assertionFailure("Serial Identifier was unexpectedly nil")