Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
4ee9cdc7
Commit
4ee9cdc7
authored
Jun 28, 2013
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compat datetime import when oauth2 provide does not support timezone aware datetimes
parent
1f6a59d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletions
+3
-1
.gitignore
+1
-0
rest_framework/compat.py
+2
-1
No files found.
.gitignore
View file @
4ee9cdc7
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
.*
.*
html/
html/
htmlcov/
coverage/
coverage/
build/
build/
dist/
dist/
...
...
rest_framework/compat.py
View file @
4ee9cdc7
...
@@ -494,7 +494,8 @@ try:
...
@@ -494,7 +494,8 @@ try:
if
provider_version
in
(
'0.2.3'
,
'0.2.4'
):
if
provider_version
in
(
'0.2.3'
,
'0.2.4'
):
# 0.2.3 and 0.2.4 are supported version that do not support
# 0.2.3 and 0.2.4 are supported version that do not support
# timezone aware datetimes
# timezone aware datetimes
from
datetime.datetime
import
now
as
provider_now
import
datetime
provider_now
=
datetime
.
datetime
.
now
else
:
else
:
# Any other supported version does use timezone aware datetimes
# Any other supported version does use timezone aware datetimes
from
django.utils.timezone
import
now
as
provider_now
from
django.utils.timezone
import
now
as
provider_now
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment