moved epoch_now to date_utils

This commit is contained in:
fawce
2012-04-18 23:14:21 -04:00
parent 1c65cc30a5
commit ddb1c51569
+4
View File
@@ -55,6 +55,10 @@ def UN_EPOCH(ms_since_epoch):
def iso8061_to_epoch(datestring):
dt = parse_iso8061(datestring)
return EPOCH(dt)
def epoch_now():
dt = datetime.utcnow().replace(tzinfo=pytz.utc)
return EPOCH(dt)
# UTC Datetime Subclasses
# -----------------------