diff --git a/binance/helpers.py b/binance/helpers.py index fe91df3f4..35fe90c2c 100644 --- a/binance/helpers.py +++ b/binance/helpers.py @@ -19,7 +19,7 @@ def date_to_milliseconds(date_str): # get epoch value in UTC epoch = datetime.utcfromtimestamp(0).replace(tzinfo=pytz.utc) # parse our date string - d = dateparser.parse(date_str) + d = dateparser.parse(date_str, settings={'TO_TIMEZONE': 'UTC'}) # if the date is not timezone aware apply UTC timezone if d.tzinfo is None or d.tzinfo.utcoffset(d) is None: d = d.replace(tzinfo=pytz.utc)