Skip to content

Commit

Permalink
Update _get_datetime docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Daniels committed Jul 9, 2015
1 parent 70b07d4 commit 3b7a21c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zipline/assets/futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ def _get_datetime(self):
Returns
-------
pandas.Timestamp
The datetime of FutureChain's TradingAlgorithm, if valid.
Otherwise uses the period start of the simulation.
The normalized datetime of FutureChain's TradingAlgorithm.
"""
return normalize_date(
Timestamp(self._algorithm_get_datetime(), tz='UTC')
Expand Down Expand Up @@ -109,6 +108,7 @@ def _maybe_update_current_chain(self):
The up-to-date current chain.
"""
dt = self._get_datetime()

if (self._last_updated is None) or (self._last_updated != dt):
self._current_chain = self._asset_finder.lookup_future_chain(
self.root_symbol,
Expand Down

0 comments on commit 3b7a21c

Please sign in to comment.