File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,7 +208,12 @@ public SecurityExchange Exchange
208208 _exchange = value ;
209209 if ( _localTimeKeeper != null && ! _exchange . HasTimeProvider )
210210 {
211- _exchange . SetLocalDateTimeFrontierProvider ( _localTimeKeeper ) ;
211+ var hasDifferentTimeZones = _localTimeKeeper . TimeZone != _exchange . TimeZone ;
212+ var newLocalTimeKeeper = hasDifferentTimeZones
213+ ? new LocalTimeKeeper ( _localTimeKeeper . LocalTime . ConvertToUtc ( _exchange . TimeZone ) , _exchange . TimeZone )
214+ : _localTimeKeeper ;
215+
216+ _exchange . SetLocalDateTimeFrontierProvider ( newLocalTimeKeeper ) ;
212217 }
213218 }
214219 }
Original file line number Diff line number Diff line change @@ -57,12 +57,12 @@ public class SecurityExchange
5757 /// <summary>
5858 /// Boolean property for quickly testing if the exchange is 10 minutes away from closing.
5959 /// </summary>
60- public bool ClosingSoon => IsClosingSoon ( minutesToClose : 10 ) ;
60+ public bool ClosingSoon => IsClosingSoon ( minutesToClose : 10 ) ;
6161
6262 /// <summary>
6363 /// Indicates whether a time provider has been set for this exchange.
6464 /// </summary>
65- public bool HasTimeProvider => _timeProvider != null ;
65+ internal bool HasTimeProvider => _timeProvider != null ;
6666
6767 /// <summary>
6868 /// Initializes a new instance of the <see cref="SecurityExchange"/> class using the specified
You can’t perform that action at this time.
0 commit comments