Esempio n. 1
0
 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")
Esempio n. 2
0
 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")
Esempio n. 3
0
 def _query_tx(self, datetime_str):
     time = parse_to_aware(datetime_str)
     records = Tx.objects.filter(time__gte=time)
     return records[0]