Browse Source

Minor order shift.

pull/101/head
Abhishek 4 years ago
parent
commit
443de18a51
  1. 12
      Clocker/Panel/Data Layer/TimezoneDataOperations.swift

12
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)
}

Loading…
Cancel
Save