Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle timestamps with timezones set #108

Merged
merged 5 commits into from
Sep 1, 2019
Merged

handle timestamps with timezones set #108

merged 5 commits into from
Sep 1, 2019

Conversation

erikbern
Copy link
Contributor

@erikbern erikbern commented Sep 1, 2019

no reason to have to set now explicitly going forward

another minor fix that came up

convoys/utils.py Outdated
@@ -108,13 +108,13 @@ def _calculate_T(row):
if now is not None:
return _sub(row[now], row[created])
else:
return _sub(datetime.datetime.now(), row[created])
return datetime.datetime.now(tz=row[created].tzinfo) - row[created]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (87 > 79 characters)

@coveralls
Copy link

coveralls commented Sep 1, 2019

Coverage Status

Coverage increased (+1.07%) to 97.861% when pulling d3d05e3 on timezones into 263690c on master.

@erikbern
Copy link
Contributor Author

erikbern commented Sep 1, 2019

realized this bug wasn't fixed, my test code was broken. will fix later.

@erikbern
Copy link
Contributor Author

erikbern commented Sep 1, 2019

kind of silly that this is 40 lines of test for 3 lines of code, but whatev

@erikbern erikbern merged commit dbd2c34 into master Sep 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants