TST: Ensure that test bars and events use midnight for daily data.

Daily data should be using midnight as the timestamp,
ensure that test data created by data_gen use midnight, so that
upcoming implementations that rely on the timestamp will be compatible.
This commit is contained in:
Eddie Hebert
2013-04-25 11:30:57 -04:00
parent c6cbc9f8e2
commit fed0a9a998
+5
View File
@@ -59,6 +59,11 @@ def date_gen(start=datetime(2006, 6, 6, 12, tzinfo=pytz.utc),
"""
one_day = timedelta(days=1)
cur = start
if delta == one_day:
# if we are producing daily timestamps, we
# use midnight
cur = cur.replace(hour=0, minute=0, second=0,
microsecond=0)
# yield count trade events, all on trading days, and
# during trading hours.