[Mod] relpace bar second/microsecond to 0 when force generated, #1815

This commit is contained in:
vn.py 2019-06-11 11:21:03 +08:00
parent 1ba27ca5e3
commit b4bea24802

View File

@ -253,6 +253,9 @@ class BarGenerator:
"""
Generate the bar data and call callback immediately.
"""
self.bar.datetime = self.bar.datetime.replace(
second=0, microsecond=0
)
self.on_bar(self.bar)
self.bar = None