コード例 #1
0
ファイル: OrderGroup.py プロジェクト: udsquid/gann
 def _make_start_time(self, arg):
     if arg['<date>'] and arg['<time>']:
         datetime_str = '{} {}'.format(arg['<date>'], arg['<time>'])
         return parse_to_aware(datetime_str)
     if self.first_match:
         return to_local(self.first_match.time)
     raise Exception("*** no date-time specified or match record")
コード例 #2
0
ファイル: OrderGroup.py プロジェクト: udsquid/gann
 def _make_start_time(self, arg):
     if arg['<date>'] and arg['<time>']:
         datetime_str = '{} {}'.format(arg['<date>'], arg['<time>'])
         return parse_to_aware(datetime_str)
     if self.first_match:
         return to_local(self.first_match.time)
     raise Exception("*** no date-time specified or match record")
コード例 #3
0
ファイル: test_OrderGroup.py プロジェクト: udsquid/gann
 def _query_tx(self, datetime_str):
     time = parse_to_aware(datetime_str)
     records = Tx.objects.filter(time__gte=time)
     return records[0]