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

@ -27,18 +27,20 @@ extension TimezoneDataOperations {
return CLEmptyString 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) { if (dataObject.timezoneFormat(DataStore.shared().timezoneFormat()) == DateFormat.epochTime) {
print("Slider Value is \(sliderValue)")
let timezone = TimeZone(identifier: dataObject.timezone()) let timezone = TimeZone(identifier: dataObject.timezone())
let offset = timezone?.secondsFromGMT(for: newDate) ?? 0 let offset = timezone?.secondsFromGMT(for: newDate) ?? 0
let value = Int(Date().timeIntervalSince1970 + Double(offset)) let value = Int(Date().timeIntervalSince1970 + Double(offset))
return "\(value)" 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) return dateFormatter.string(from: newDate)
} }

Loading…
Cancel
Save