Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
BUG: Datetimes should be converted in utc. #1635
Fixes a bug where dataframes being returned were creating US/Eastern timestamps out of the ints, potentially changing the date returned to be the date before (at 19 hours).
>>> dt = datetime.datetime(2017, 1, 4, 0, 0) >>> today_date_epoch = int((dt.date() - datetime.date(1970,1,1)).total_seconds()) >>> today_date_epoch 1483488000 >>> datetime.datetime.fromtimestamp(today_date_epoch) datetime.datetime(2017, 1, 3, 19, 0)
With UTC, the timestamp is now essentially being created like the following:
>>> datetime.datetime.utcfromtimestamp(today_date_epoch) datetime.datetime(2017, 1, 4, 0, 0)