From 443de18a51a3a57465e99600280292afc49f4a99 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Fri, 2 Jul 2021 10:48:33 -0500 Subject: [PATCH] Minor order shift. --- .../Panel/Data Layer/TimezoneDataOperations.swift | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Clocker/Panel/Data Layer/TimezoneDataOperations.swift b/Clocker/Panel/Data Layer/TimezoneDataOperations.swift index c6b27fb..94cb558 100644 --- a/Clocker/Panel/Data Layer/TimezoneDataOperations.swift +++ b/Clocker/Panel/Data Layer/TimezoneDataOperations.swift @@ -26,19 +26,21 @@ extension TimezoneDataOperations { assertionFailure("Data was unexpectedly nil") return CLEmptyString } - - let dateFormatter = DateFormatterManager.dateFormatterWithFormat(with: .none, - format: dataObject.timezoneFormat(DataStore.shared().timezoneFormat()), - timezoneIdentifier: dataObject.timezone(), - locale: Locale.autoupdatingCurrent) if (dataObject.timezoneFormat(DataStore.shared().timezoneFormat()) == DateFormat.epochTime) { + print("Slider Value is \(sliderValue)") let timezone = TimeZone(identifier: dataObject.timezone()) let offset = timezone?.secondsFromGMT(for: newDate) ?? 0 let value = Int(Date().timeIntervalSince1970 + Double(offset)) return "\(value)" } + let dateFormatter = DateFormatterManager.dateFormatterWithFormat(with: .none, + format: dataObject.timezoneFormat(DataStore.shared().timezoneFormat()), + timezoneIdentifier: dataObject.timezone(), + locale: Locale.autoupdatingCurrent) + + return dateFormatter.string(from: newDate) }