|
|
|
@ -27,18 +27,20 @@ extension TimezoneDataOperations {
|
|
|
|
|
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) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|