Skip to content

Commit

Permalink
Merge branch 'feature/time_util' into swift
Browse files Browse the repository at this point in the history
  • Loading branch information
kosyloa committed Nov 30, 2023
2 parents 417d9cd + bad731d commit 62b2d31
Show file tree
Hide file tree
Showing 31 changed files with 792 additions and 225 deletions.
54 changes: 50 additions & 4 deletions DXFeedFramework.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
647426AD2ABC85F20012F793 /* Arguments.swift in Sources */ = {isa = PBXBuildFile; fileRef = 647426AC2ABC85F20012F793 /* Arguments.swift */; };
647426AF2ABC93900012F793 /* EventCode+String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 647426AE2ABC93900012F793 /* EventCode+String.swift */; };
6479BC2B2A4F35A300A3D404 /* QuoteView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6479BC2A2A4F35A300A3D404 /* QuoteView.swift */; };
648468AC2B0D06FA008297AE /* DXDateOffset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 648468AB2B0D06FA008297AE /* DXDateOffset.swift */; };
6486B9582AD00BDC00D8D5FA /* Summary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6486B9572AD00BDC00D8D5FA /* Summary.swift */; };
6486B95B2AD015B400D8D5FA /* PriceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6486B95A2AD015B400D8D5FA /* PriceType.swift */; };
6486B95D2AD0287E00D8D5FA /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6486B95C2AD0287E00D8D5FA /* DateTests.swift */; };
Expand All @@ -213,7 +214,6 @@
648BD56B2AC4576F004A3A95 /* HelpTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 648BD56A2AC4576F004A3A95 /* HelpTool.swift */; };
648BD56D2AC56A04004A3A95 /* SubscriptionUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 648BD56C2AC56A04004A3A95 /* SubscriptionUtils.swift */; };
648BD56F2AC582AB004A3A95 /* DateTimeParserTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 648BD56E2AC582AB004A3A95 /* DateTimeParserTest.swift */; };
648BD5712AC583AC004A3A95 /* TimeFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 648BD5702AC583AC004A3A95 /* TimeFormat.swift */; };
648E98AA2AAF625800BFD219 /* IIndexedEvent+Ext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 648E98A92AAF625800BFD219 /* IIndexedEvent+Ext.swift */; };
649282E72AD54919008F0F04 /* ScheduleUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649282E62AD54919008F0F04 /* ScheduleUtils.swift */; };
649282E82AD54919008F0F04 /* ScheduleUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649282E62AD54919008F0F04 /* ScheduleUtils.swift */; };
Expand All @@ -233,6 +233,13 @@
649F48882A615BED0016FDD1 /* CandleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649F48872A615BED0016FDD1 /* CandleType.swift */; };
64A42F3B2B07A7A3001C3ACC /* SymbolParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64A42F3A2B07A7A3001C3ACC /* SymbolParser.swift */; };
64A42F3E2B07A807001C3ACC /* NativeSymbolParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64A42F3D2B07A807001C3ACC /* NativeSymbolParser.swift */; };
64A42F452B0B933B001C3ACC /* NativeTimeUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64A42F442B0B933B001C3ACC /* NativeTimeUtil.swift */; };
64A42F472B0B9368001C3ACC /* NativeTimeZone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64A42F462B0B9367001C3ACC /* NativeTimeZone.swift */; };
64A42F492B0B9683001C3ACC /* NativeTimeFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64A42F482B0B9683001C3ACC /* NativeTimeFormat.swift */; };
64A42F4B2B0B96EF001C3ACC /* NativeTimePeriod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64A42F4A2B0B96EF001C3ACC /* NativeTimePeriod.swift */; };
64A42F4E2B0B9FA4001C3ACC /* DXTimeZone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64A42F4D2B0B9FA4001C3ACC /* DXTimeZone.swift */; };
64A42F502B0BA668001C3ACC /* DXTimeFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64A42F4F2B0BA668001C3ACC /* DXTimeFormat.swift */; };
64A42F522B0BBB6D001C3ACC /* DXTimePeriod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64A42F512B0BBB6D001C3ACC /* DXTimePeriod.swift */; };
64AAF0532A8113E800E8942B /* String+Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64AAF0522A8113E800E8942B /* String+Range.swift */; };
64AAF0552A82499A00E8942B /* ConcurrentDict.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64AAF0542A82499A00E8942B /* ConcurrentDict.swift */; };
64AAF0572A82A3FC00E8942B /* ICandleSymbolProperty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64AAF0562A82A3FC00E8942B /* ICandleSymbolProperty.swift */; };
Expand Down Expand Up @@ -656,6 +663,7 @@
647426AC2ABC85F20012F793 /* Arguments.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Arguments.swift; sourceTree = "<group>"; };
647426AE2ABC93900012F793 /* EventCode+String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EventCode+String.swift"; sourceTree = "<group>"; };
6479BC2A2A4F35A300A3D404 /* QuoteView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuoteView.swift; sourceTree = "<group>"; };
648468AB2B0D06FA008297AE /* DXDateOffset.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DXDateOffset.swift; sourceTree = "<group>"; };
6486B9572AD00BDC00D8D5FA /* Summary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Summary.swift; sourceTree = "<group>"; };
6486B95A2AD015B400D8D5FA /* PriceType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PriceType.swift; sourceTree = "<group>"; };
6486B95C2AD0287E00D8D5FA /* DateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateTests.swift; sourceTree = "<group>"; };
Expand All @@ -678,7 +686,6 @@
648BD56A2AC4576F004A3A95 /* HelpTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelpTool.swift; sourceTree = "<group>"; };
648BD56C2AC56A04004A3A95 /* SubscriptionUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionUtils.swift; sourceTree = "<group>"; };
648BD56E2AC582AB004A3A95 /* DateTimeParserTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateTimeParserTest.swift; sourceTree = "<group>"; };
648BD5702AC583AC004A3A95 /* TimeFormat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeFormat.swift; sourceTree = "<group>"; };
648E98A92AAF625800BFD219 /* IIndexedEvent+Ext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "IIndexedEvent+Ext.swift"; sourceTree = "<group>"; };
649282E62AD54919008F0F04 /* ScheduleUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScheduleUtils.swift; sourceTree = "<group>"; };
649282E92AD55323008F0F04 /* IpfConnect.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IpfConnect.swift; sourceTree = "<group>"; };
Expand All @@ -697,6 +704,13 @@
649F48872A615BED0016FDD1 /* CandleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CandleType.swift; sourceTree = "<group>"; };
64A42F3A2B07A7A3001C3ACC /* SymbolParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolParser.swift; sourceTree = "<group>"; };
64A42F3D2B07A807001C3ACC /* NativeSymbolParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeSymbolParser.swift; sourceTree = "<group>"; };
64A42F442B0B933B001C3ACC /* NativeTimeUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeTimeUtil.swift; sourceTree = "<group>"; };
64A42F462B0B9367001C3ACC /* NativeTimeZone.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeTimeZone.swift; sourceTree = "<group>"; };
64A42F482B0B9683001C3ACC /* NativeTimeFormat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeTimeFormat.swift; sourceTree = "<group>"; };
64A42F4A2B0B96EF001C3ACC /* NativeTimePeriod.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeTimePeriod.swift; sourceTree = "<group>"; };
64A42F4D2B0B9FA4001C3ACC /* DXTimeZone.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DXTimeZone.swift; sourceTree = "<group>"; };
64A42F4F2B0BA668001C3ACC /* DXTimeFormat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DXTimeFormat.swift; sourceTree = "<group>"; };
64A42F512B0BBB6D001C3ACC /* DXTimePeriod.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DXTimePeriod.swift; sourceTree = "<group>"; };
64AAF0522A8113E800E8942B /* String+Range.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Range.swift"; sourceTree = "<group>"; };
64AAF0542A82499A00E8942B /* ConcurrentDict.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConcurrentDict.swift; sourceTree = "<group>"; };
64AAF0562A82A3FC00E8942B /* ICandleSymbolProperty.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICandleSymbolProperty.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1118,6 +1132,7 @@
64656F552A1B6A07006A0B19 /* Utils */ = {
isa = PBXGroup;
children = (
64A42F4C2B0B9F95001C3ACC /* DateTime */,
641AC1A82A61AE4000EF6D6C /* DXAliases.swift */,
64656F5F2A1B9EC2006A0B19 /* EnumUtil.swift */,
64656F642A1CAFC5006A0B19 /* String+Pointee.swift */,
Expand All @@ -1139,7 +1154,6 @@
64C771F12A94A224009868C2 /* Character+Ext.swift */,
64C772002A975102009868C2 /* Reference+Util.swift */,
6464074E2A9F62D4006FF769 /* Date+Ext.swift */,
648BD5702AC583AC004A3A95 /* TimeFormat.swift */,
64A42F3A2B07A7A3001C3ACC /* SymbolParser.swift */,
);
path = Utils;
Expand Down Expand Up @@ -1257,6 +1271,28 @@
path = QDS;
sourceTree = "<group>";
};
64A42F432B0B9320001C3ACC /* Utils */ = {
isa = PBXGroup;
children = (
64A42F442B0B933B001C3ACC /* NativeTimeUtil.swift */,
64A42F462B0B9367001C3ACC /* NativeTimeZone.swift */,
64A42F482B0B9683001C3ACC /* NativeTimeFormat.swift */,
64A42F4A2B0B96EF001C3ACC /* NativeTimePeriod.swift */,
);
path = Utils;
sourceTree = "<group>";
};
64A42F4C2B0B9F95001C3ACC /* DateTime */ = {
isa = PBXGroup;
children = (
64A42F4D2B0B9FA4001C3ACC /* DXTimeZone.swift */,
64A42F4F2B0BA668001C3ACC /* DXTimeFormat.swift */,
64A42F512B0BBB6D001C3ACC /* DXTimePeriod.swift */,
648468AB2B0D06FA008297AE /* DXDateOffset.swift */,
);
path = DateTime;
sourceTree = "<group>";
};
64ACBCDB2A28974900032C53 /* Osub */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1493,6 +1529,7 @@
64437A902A9DF1C4005929B2 /* Ipf */,
6498E6B32AB1D43A0093A065 /* Schedule */,
64ACBCE42A28AEE200032C53 /* SymbolMappers */,
64A42F432B0B9320001C3ACC /* Utils */,
);
path = Native;
sourceTree = "<group>";
Expand Down Expand Up @@ -2143,6 +2180,7 @@
64BDDB322AD7E5A600694210 /* SpreadOrderMapper.swift in Sources */,
64ACBCE32A289A0700032C53 /* TimeSeriesSubscriptionSymbol.swift in Sources */,
645A34952A937C7200709F29 /* BinaryInteger+Ext.swift in Sources */,
64A42F502B0BA668001C3ACC /* DXTimeFormat.swift in Sources */,
64BA92652A306E0200BE26A0 /* Trade.swift in Sources */,
6486B9752AD0493F00D8D5FA /* TheoPrice+Ext.swift in Sources */,
6464074B2A9DFAF7006FF769 /* InstrumentProfile+Ext.swift in Sources */,
Expand All @@ -2161,6 +2199,7 @@
64ECD6852A9DDF6200B36935 /* DXInstrumentProfileCollector.swift in Sources */,
6486B96F2AD0445400D8D5FA /* Underlying+Ext.swift in Sources */,
64656F5B2A1B9784006A0B19 /* DXFeed.swift in Sources */,
64A42F472B0B9368001C3ACC /* NativeTimeZone.swift in Sources */,
6486B96B2AD03DC900D8D5FA /* Underlying.swift in Sources */,
6447A5EF2A8FD1CD00739CCF /* DayUtil.swift in Sources */,
64B436462AB985AE0003919E /* NativeBox.swift in Sources */,
Expand Down Expand Up @@ -2226,7 +2265,9 @@
6486B9632AD0333B00D8D5FA /* Greeks.swift in Sources */,
64E342522AAB29CF00457994 /* InstrumentProfileType.swift in Sources */,
648E98AA2AAF625800BFD219 /* IIndexedEvent+Ext.swift in Sources */,
64A42F452B0B933B001C3ACC /* NativeTimeUtil.swift in Sources */,
6447A5E32A8F611700739CCF /* IObservableSubscription.swift in Sources */,
64A42F4E2B0B9FA4001C3ACC /* DXTimeZone.swift in Sources */,
64104FC92A26298D00D1FC41 /* DXFeedSubcription.swift in Sources */,
64ABC1032AD9294D00904D78 /* OptionSaleMapper.swift in Sources */,
64104FD32A277B2D00D1FC41 /* ListNative.swift in Sources */,
Expand Down Expand Up @@ -2286,9 +2327,9 @@
640C3FD62A6179E300555161 /* CandleAlignment.swift in Sources */,
640C3FCC2A616B6200555161 /* ArgumentException.swift in Sources */,
64B436442AB88EA40003919E /* NativeDay.swift in Sources */,
648BD5712AC583AC004A3A95 /* TimeFormat.swift in Sources */,
642BE4C42A2E1AFF0052340A /* Quote.swift in Sources */,
64656F602A1B9EC2006A0B19 /* EnumUtil.swift in Sources */,
64A42F492B0B9683001C3ACC /* NativeTimeFormat.swift in Sources */,
642BE4CA2A2E1C640052340A /* MarketEvent.swift in Sources */,
6486B95B2AD015B400D8D5FA /* PriceType.swift in Sources */,
64BDDB202AD6CC8300694210 /* AnalyticOrder.swift in Sources */,
Expand All @@ -2299,6 +2340,9 @@
64AAF0592A83EA0000E8942B /* Double+Ext.swift in Sources */,
64BDDB2A2AD7D9C700694210 /* SpreadOrder+Ext.swift in Sources */,
8088D77529C3A61000F240CB /* ErrorCheck.swift in Sources */,
64A42F4B2B0B96EF001C3ACC /* NativeTimePeriod.swift in Sources */,
648468AC2B0D06FA008297AE /* DXDateOffset.swift in Sources */,
64A42F522B0BBB6D001C3ACC /* DXTimePeriod.swift in Sources */,
6486B9672AD0390800D8D5FA /* GreeksMapper.swift in Sources */,
64AAF0572A82A3FC00E8942B /* ICandleSymbolProperty.swift in Sources */,
64437A922A9DF1DE005929B2 /* NativeInstrumentProfileReader.swift in Sources */,
Expand Down Expand Up @@ -2521,6 +2565,7 @@
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
GCC_OPTIMIZATION_LEVEL = fast;
LD_RUNPATH_SEARCH_PATHS = "@executable_path";
MACOSX_DEPLOYMENT_TARGET = 13.3;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -3188,6 +3233,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_OPTIMIZATION_LEVEL = fast;
GENERATE_INFOPLIST_FILE = YES;
HEADER_SEARCH_PATHS = "";
INFOPLIST_KEY_NSHumanReadableCopyright = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class TimeSeriesSubscriptionSymbol: GenericIndexedEventSubscriptionSymbol

/// Custom symbol has to return string representation.
public override var stringValue: String {
return "\(symbol){fromTime=\(TimeUtil.toLocalDateString(millis: fromTime))}"
return "\(symbol){fromTime=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: fromTime)) ?? "")}"
}
}

Expand Down
4 changes: 2 additions & 2 deletions DXFeedFramework/Events/Market/Candles/Candle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ extension Candle {
func baseFieldsToString() -> String {
return """
\(eventSymbol), \
eventTime=\(TimeUtil.toLocalDateString(millis: eventTime)), \
eventTime=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: eventTime)) ?? ""), \
eventFlags=\(eventFlags.toHexString()), \
time=\(TimeUtil.toLocalDateString(millis: time)), \
time=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: time)) ?? ""), \
sequence=\(getSequence()), \
count=\(count), \
open=\(open), \
Expand Down
7 changes: 4 additions & 3 deletions DXFeedFramework/Events/Market/Extra/OrderBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -285,18 +285,19 @@ extension OrderBase {

/// Returns string representation of this candle fields.
func baseFieldsToString() -> String {

return
"""
\(eventSymbol), \
eventTime=\(TimeUtil.toLocalDateString(millis: eventTime)), \
eventTime=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: eventTime)) ?? ""), \
source=\(eventSource.name), \
eventFlags=\(eventFlags.toHexString()), \
index=\(index.toHexString()), \
time=\(TimeUtil.toLocalDateString(millis: time)), \
time=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: time)) ?? ""), \
sequence=\(getSequence()), \
timeNanoPart=\(timeNanoPart), \
action=\(action), \
actionTime=\(TimeUtil.toLocalDateString(millis: actionTime)), \
actionTime=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: actionTime)) ?? ""), \
orderId=\(orderId), \
auxOrderId=\(auxOrderId), \
price=\(price), \
Expand Down
4 changes: 2 additions & 2 deletions DXFeedFramework/Events/Market/Extra/TradeBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ extension TradeBase {
func baseFieldsToString() -> String {
return """
\(eventSymbol), \
eventTime=\(TimeUtil.toLocalDateString(millis: eventTime)), \
time=\(TimeUtil.toLocalDateString(millis: time)), \
eventTime=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: eventTime)) ?? ""), \
time=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: time)) ?? ""), \
timeNanoPart=\(timeNanoPart), \
sequence=\(self.getSequence()), \
exchange=\(StringUtil.encodeChar(char: exchangeCode)), \
Expand Down
4 changes: 2 additions & 2 deletions DXFeedFramework/Events/Market/Greeks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ extension Greeks {
public func toString() -> String {
return """
Greeks{\(eventSymbol), \
eventTime=\(TimeUtil.toLocalDateString(millis: eventTime)), \
eventTime=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: eventTime)) ?? ""), \
eventFlags=\(eventFlags.toHexString()), \
time=\(TimeUtil.toLocalDateString(millis: time)), \
time=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: time)) ?? ""), \
sequence=\(self.getSequence()), \
price=\(price), \
volatility=\(volatility), \
Expand Down
6 changes: 3 additions & 3 deletions DXFeedFramework/Events/Market/OptionSale.swift
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@ extension OptionSale {
public func toString() -> String {
return """
OptionSale{\(eventSymbol), \
eventTime=\(TimeUtil.toLocalDateString(millis: eventTime)), \
eventTime=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: eventTime)) ?? ""), \
eventFlags=\(eventFlags.toHexString()), \
index=\(index.toHexString()), \
time=\(TimeUtil.toLocalDateString(millis: time)), \
time=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: time)) ?? ""), \
timeNanoPart=\(timeNanoPart), \
sequence=\(getSequence()), \
exchange=\(StringUtil.encodeChar(char: exchangeCode)), \
Expand All @@ -259,7 +259,7 @@ type=\(optionSaleType), \
underlyingPrice=\(underlyingPrice), \
volatility=\(volatility), \
delta=\(delta), \
optionSymbol='\(optionSymbol)'\
optionSymbol='\(optionSymbol ?? "null")'\
}
"""
}
Expand Down
6 changes: 3 additions & 3 deletions DXFeedFramework/Events/Market/Profile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ extension Profile {
func baseFieldsToString() -> String {
return """
\(eventSymbol), \
eventTime=\(TimeUtil.toLocalDateString(millis: eventTime)), \
eventTime=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: eventTime)) ?? ""), \
description='\(descriptionStr ?? "null")', \
SSR=\(shortSaleRestriction), \
status=\(tradingStatus), \
statusReason='\(statusReason ?? "null")', \
haltStartTime=\(TimeUtil.toLocalDateStringWithoutMillis(millis: haltStartTime)), \
haltEndTime=\(TimeUtil.toLocalDateStringWithoutMillis(millis: haltEndTime)), \
haltStartTime=\((try? DXTimeFormat.defaultTimeFormat?.format(value: haltStartTime)) ?? ""), \
haltEndTime=\((try? DXTimeFormat.defaultTimeFormat?.format(value: haltEndTime)) ?? ""), \
highLimitPrice=\(highLimitPrice), \
lowLimitPrice=\(lowLimitPrice), \
high52WeekPrice=\(high52WeekPrice), \
Expand Down
8 changes: 4 additions & 4 deletions DXFeedFramework/Events/Market/Quote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ extension Quote {
func baseFieldsToString() -> String {
return """
\(eventSymbol), \
eventTime=\(TimeUtil.toLocalDateString(millis: eventTime)), \
time=\(TimeUtil.toLocalDateString(millis: time)), \
eventTime=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: eventTime)) ?? ""), \
time=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: time)) ?? ""), \
timeNanoPart=\(timeNanoPart), \
sequence=\(getSequence()), \
bidTime=\(TimeUtil.toLocalDateStringWithoutMillis(millis: bidTime)), \
bidTime=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: bidTime)) ?? ""), \
bidExchange=\(StringUtil.encodeChar(char: bidExchangeCode)), \
bidPrice=\(bidPrice), \
bidSize=\(bidSize), \
askTime=\(TimeUtil.toLocalDateStringWithoutMillis(millis: askTime)), \
askTime=\((try? DXTimeFormat.defaultTimeFormat?.withMillis?.format(value: askTime)) ?? ""), \
askExchange=\(StringUtil.encodeChar(char: askExchangeCode)), \
askPrice=\(askPrice), \
askSize=\(askSize)
Expand Down
Loading

0 comments on commit 62b2d31

Please sign in to comment.