diff --git a/examples/QuantosDataService/dataService.py b/examples/QuantosDataService/dataService.py index 4246f6d8..2571f871 100644 --- a/examples/QuantosDataService/dataService.py +++ b/examples/QuantosDataService/dataService.py @@ -66,7 +66,12 @@ def generateVtBar(row): sec=bar.time[4:6] if minute=="00": minute="59" - hour=str(int(hour)-1).rjust(2,'0') + + h = int(hour) + if h == 0: + h = 24 + + hour=str(h-1).rjust(2,'0') else: minute=str(int(minute)-1).rjust(2,'0') bar.time=hour+minute+sec