Example #1
0
 def _dt_to_ts_with_format(dt):
     ts = dt_to_ts_with_format(dt, ts_format=rule['timestamp_format'])
     if 'timestamp_format_expr' in rule:
         # eval expression passing 'ts' and 'dt'
         return eval(rule['timestamp_format_expr'], {'ts': ts, 'dt': dt})
     else:
         return ts
Example #2
0
 def _dt_to_ts_with_format(dt):
     ts = dt_to_ts_with_format(dt, ts_format=rule['timestamp_format'])
     if 'timestamp_format_expr' in rule:
         # eval expression passing 'ts' and 'dt'
         return eval(rule['timestamp_format_expr'], {'ts': ts, 'dt': dt})
     else:
         return ts
Example #3
0
 def _dt_to_ts_with_format(dt):
     return dt_to_ts_with_format(dt, ts_format=rule['timestamp_format'])
Example #4
0
 def _dt_to_ts_with_format(dt):
     return dt_to_ts_with_format(dt, ts_format=rule['timestamp_format'])