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

Use .utcnow() rather than .now() #505

Merged
merged 2 commits into from
Apr 30, 2016
Merged

Use .utcnow() rather than .now() #505

merged 2 commits into from
Apr 30, 2016

Conversation

jhamrick
Copy link
Member

Fixes part of #504

@lgpage would you mind checking this PR out and testing whether it fixes that test failure for you?

@jhamrick jhamrick added this to the 0.3.0 milestone Apr 30, 2016
@lgpage
Copy link
Member

lgpage commented Apr 30, 2016

$ py.test -x -vv nbgrader/tests/api/ PASSED
$ py.test -x -vv nbgrader/tests/apps/ PASSED
$ py.test -x -vv nbgrader/tests/preprocessors/PASSED
$ py.test -x -vv nbgrader/tests/utils/ PASSED
$ py.test -x -vv nbgrader/tests/formgrader/ PASSED (tested without Jupyterhub)
$ py.test -x -vv nbgrader/tests/nbextensions/ PASSED

@jhamrick
Copy link
Member Author

Woohoo, thanks!

@jhamrick jhamrick merged commit 1dc74f0 into jupyter:master Apr 30, 2016
@jhamrick jhamrick deleted the utcnow branch April 30, 2016 17:30
@minrk
Copy link
Member

minrk commented May 2, 2016

A cool thing I learned recently: if you can rely on Python ≥ 3.2, you can do timezone-aware UTC timestamps with the stdlib:

datetime.datetime.now(datetime.timezone.utc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants