Skip to content

Commit

Permalink
fix datetime_to_epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarbugli committed Nov 6, 2013
1 parent 842e96d commit b7896a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions feedly/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

logger = logging.getLogger(__name__)

epoch = datetime(1970,1,1)
epoch = datetime.fromtimestamp(0)

def chunks(iterable, n=10000):
it = iter(iterable)
Expand All @@ -19,7 +19,7 @@ def chunks(iterable, n=10000):


def datetime_to_epoch(dt):
return (dt - epoch).total_seconds()
return int((dt - epoch).total_seconds())


def epoch_to_datetime(time_):
Expand Down

0 comments on commit b7896a2

Please sign in to comment.