mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-30 05:39:30 +08:00
Merge pull request #42 from quantopian/iso8061_to_8601
Remove unused ISO 8601 stuff from Zipline
This commit is contained in:
@@ -61,7 +61,6 @@ Dependencies
|
||||
* pandas (>= 0.9.0)
|
||||
* pytz
|
||||
* msgpack-python
|
||||
* iso8601
|
||||
* Logbook
|
||||
* blist
|
||||
|
||||
|
||||
@@ -15,18 +15,9 @@
|
||||
|
||||
|
||||
import pytz
|
||||
import iso8601
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
|
||||
# iso8061 utility
|
||||
# ---------------------
|
||||
def parse_iso8061(date_string):
|
||||
dt = iso8601.parse_date(date_string)
|
||||
dt = dt.replace(tzinfo=pytz.utc)
|
||||
return dt
|
||||
|
||||
|
||||
# Epoch utilities
|
||||
# ---------------------
|
||||
UNIX_EPOCH = datetime(1970, 1, 1, 0, 0, tzinfo=pytz.utc)
|
||||
@@ -64,11 +55,6 @@ def UN_EPOCH(ms_since_epoch):
|
||||
return dt
|
||||
|
||||
|
||||
def iso8061_to_epoch(datestring):
|
||||
dt = parse_iso8061(datestring)
|
||||
return EPOCH(dt)
|
||||
|
||||
|
||||
def epoch_now():
|
||||
dt = utcnow()
|
||||
return EPOCH(dt)
|
||||
|
||||
Reference in New Issue
Block a user