1. wnielson
  2. django-chronograph

Pull requests

#4 Open
Repository
leanne
Branch
default
Repository
wnielson
Branch
default

Made localtime(dt) timezone-aware to fix Issue #31

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update 
hg pull -r default https://bitbucket.org/leanne/django-chronograph
Author
  1. Leanne McAllister
Reviewers
Description

Added timezone awareness to localtime(dt) in dates.py to fix Issue #31 (ValueError: astimezone() cannot be applied to a naive datetime), which I was getting when attempting to add a job via the admin interface. With this fix, I no longer get the error, and my "next scheduled run" time is correct.

Comments (1)

  1. Leanne McAllister author

    Additionally, you must have the following in your settings:

    USE_TZ = True
    

    Otherwise, your django DateTimeField will not be timezone-aware, and time values will be saved to your database as local times rather than UTC times, which will cause times to be incorrect when pulled from the database and translated to the current user's timezone.