From 309890afabe4e5b2251b910503ccd7a5b977bc49 Mon Sep 17 00:00:00 2001 From: AKosylo Date: Tue, 7 Nov 2023 10:01:42 +0100 Subject: [PATCH] remove index value from toString() fix date format in toString() --- .../xcshareddata/xcschemes/Tools.xcscheme | 6 +++++- DXFeedFramework/Events/Market/Candles/Candle.swift | 3 +-- DXFeedFramework/Events/Market/Greeks.swift | 1 - DXFeedFramework/Events/Market/TheoPrice.swift | 1 - DXFeedFramework/Events/Market/TimeAndSale.swift | 1 - DXFeedFramework/Events/Market/Underlying.swift | 1 - DXFeedFramework/Utils/TimeUtil.swift | 2 +- Samples/Tools/SubscriptionUtils.swift | 3 +++ 8 files changed, 10 insertions(+), 8 deletions(-) diff --git a/DXFeedFramework.xcodeproj/xcshareddata/xcschemes/Tools.xcscheme b/DXFeedFramework.xcodeproj/xcshareddata/xcschemes/Tools.xcscheme index a1efe3833..4e0c59746 100644 --- a/DXFeedFramework.xcodeproj/xcshareddata/xcschemes/Tools.xcscheme +++ b/DXFeedFramework.xcodeproj/xcshareddata/xcschemes/Tools.xcscheme @@ -76,7 +76,7 @@ isEnabled = "NO"> + + String { return """ \(eventSymbol), \ -eventTime=" + \(TimeUtil.toLocalDateString(millis: eventTime)), \ +eventTime=\(TimeUtil.toLocalDateString(millis: eventTime)), \ eventFlags=\(eventFlags.toHexString()), \ -index=\(index.toHexString()), \ time=\(TimeUtil.toLocalDateString(millis: time)), \ sequence=\(getSequence()), \ count=\(count), \ diff --git a/DXFeedFramework/Events/Market/Greeks.swift b/DXFeedFramework/Events/Market/Greeks.swift index 05b32130b..a0ca5931b 100644 --- a/DXFeedFramework/Events/Market/Greeks.swift +++ b/DXFeedFramework/Events/Market/Greeks.swift @@ -121,7 +121,6 @@ extension Greeks { Greeks{\(eventSymbol), \ eventTime=\(TimeUtil.toLocalDateString(millis: eventTime)), \ eventFlags=\(eventFlags.toHexString()), \ -index=\(index.toHexString()), \ time=\(TimeUtil.toLocalDateString(millis: time)), \ sequence=\(self.getSequence()), \ price=\(price), \ diff --git a/DXFeedFramework/Events/Market/TheoPrice.swift b/DXFeedFramework/Events/Market/TheoPrice.swift index bbf8b6d0e..ab4c1fd2e 100644 --- a/DXFeedFramework/Events/Market/TheoPrice.swift +++ b/DXFeedFramework/Events/Market/TheoPrice.swift @@ -112,7 +112,6 @@ extension TheoPrice { TheoPrice{\(eventSymbol) \ eventTime=\(TimeUtil.toLocalDateString(millis: eventTime)), \ eventFlags=\(eventFlags.toHexString()), \ -index=\(index.toHexString()), \ time=\(TimeUtil.toLocalDateString(millis: time)), \ sequence=\(self.getSequence()), \ price=\(price) \ diff --git a/DXFeedFramework/Events/Market/TimeAndSale.swift b/DXFeedFramework/Events/Market/TimeAndSale.swift index a4c44d650..03a23b8ee 100644 --- a/DXFeedFramework/Events/Market/TimeAndSale.swift +++ b/DXFeedFramework/Events/Market/TimeAndSale.swift @@ -257,7 +257,6 @@ extension TimeAndSale { TimeAndSale{\(eventSymbol), \ eventTime=\(TimeUtil.toLocalDateString(millis: eventTime)), \ eventFlags=\(eventFlags.toHexString()), \ -index=\(index.toHexString()), \ time=\(TimeUtil.toLocalDateString(millis: time)), \ timeNanoPart=\(timeNanoPart), \ sequence=\(getSequence()), \ diff --git a/DXFeedFramework/Events/Market/Underlying.swift b/DXFeedFramework/Events/Market/Underlying.swift index 0bf49b7b5..0fc7991c2 100644 --- a/DXFeedFramework/Events/Market/Underlying.swift +++ b/DXFeedFramework/Events/Market/Underlying.swift @@ -113,7 +113,6 @@ extension Underlying { Underlying{"\(eventSymbol) \ eventTime=\(TimeUtil.toLocalDateString(millis: eventTime)), \ eventFlags=\(eventFlags.toHexString()), \ -index=\(index.toHexString()), \ time=\(TimeUtil.toLocalDateString(millis: time)), \ sequence=\(self.getSequence()), \ volatility=\(volatility), \ diff --git a/DXFeedFramework/Utils/TimeUtil.swift b/DXFeedFramework/Utils/TimeUtil.swift index 2ca3b4b27..188434a81 100644 --- a/DXFeedFramework/Utils/TimeUtil.swift +++ b/DXFeedFramework/Utils/TimeUtil.swift @@ -20,7 +20,7 @@ public class TimeUtil { }() static let dateFormatterWithMillis = { let formatter = DateFormatter() - formatter.dateFormat = "yyyyMMdd-HHmmss.SSS" + formatter.dateFormat = "yyyyMMdd-HHmmss.SSSZZZZZ" return formatter }() diff --git a/Samples/Tools/SubscriptionUtils.swift b/Samples/Tools/SubscriptionUtils.swift index 4948e8e72..f6e78ba06 100644 --- a/Samples/Tools/SubscriptionUtils.swift +++ b/Samples/Tools/SubscriptionUtils.swift @@ -40,6 +40,9 @@ Create subscription to \(address) for \(types):\(symbols) with properties:\(prop let timeSubscriptionSymbols = symbols.map { symbol in TimeSeriesSubscriptionSymbol(symbol: symbol, date: date) } + print(symbols) + print(date) + print(timeSubscriptionSymbols) try? subscription?.addSymbols(timeSubscriptionSymbols) } else if source != nil { if let source = try? OrderSource.valueOf(name: source!) {