Revert "Extend timerange to support unxtime"

This reverts commit fed17de460.
This commit is contained in:
creslinux 2018-06-02 17:31:31 +03:00
parent fed17de460
commit bc3d4518ff

View File

@ -222,9 +222,6 @@ class Arguments(object):
syntax = [(r'^-(\d{8})$', (None, 'date')),
(r'^(\d{8})-$', ('date', None)),
(r'^(\d{8})-(\d{8})$', ('date', 'date')),
(r'^-(\d{10})$', (None, 'timestamp')),
(r'^(\d{10})-$', ('timestamp', None)),
(r'^(\d{10})-(\d{10})$', ('timestamp', 'timestamp')),
(r'^(-\d+)$', (None, 'line')),
(r'^(\d+)-$', ('line', None)),
(r'^(\d+)-(\d+)$', ('index', 'index'))]
@ -240,8 +237,6 @@ class Arguments(object):
start = rvals[index]
if stype[0] == 'date':
start = arrow.get(start, 'YYYYMMDD').timestamp
elif stype[0] == 'timestamp':
start = arrow.get(start).timestamp
else:
start = int(start)
index += 1
@ -249,8 +244,6 @@ class Arguments(object):
stop = rvals[index]
if stype[1] == 'date':
stop = arrow.get(stop, 'YYYYMMDD').timestamp
elif stype[1] == 'timestamp':
stop = arrow.get(stop).timestamp
else:
stop = int(stop)
return stype, start, stop