diff options
Diffstat (limited to 'rest_framework/compat.py')
| -rw-r--r-- | rest_framework/compat.py | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/rest_framework/compat.py b/rest_framework/compat.py index b748dcc5..cb122846 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -494,7 +494,8 @@ try:      if provider_version in ('0.2.3', '0.2.4'):          # 0.2.3 and 0.2.4 are supported version that do not support          # timezone aware datetimes -        from datetime.datetime import now as provider_now +        import datetime +        provider_now = datetime.datetime.now      else:          # Any other supported version does use timezone aware datetimes          from django.utils.timezone import now as provider_now  | 
