quantopian/zipline — pull request #208 by jikamens (2013-08-06 19:39:48+00:00)
Title: BUG: Trading calendar dates should always be midnight UTC

For consistency, datetimes returned by the trading calendar should
always show HHMMSS of midnight UTC. Not only is this useful for
consistency, but it also allows us to check if a particular date() is
in an array of these datetimes, because they will hash to the same
thing. For example:

early_closes = get_early_closes()
... later ...
if current_bar_datetime.date() in early_closes:
... today closes early ...

If if the datetimes returned by the trading calendar functions don't
have 00:00:00 for HHMMSS, then the "in" check above will fail because
the date and the datetimes in early_closes won't hash to the same
thing.