Skip to content

Timezone and get_datetaken #17

@KosuzuMotoori

Description

@KosuzuMotoori

If timezone support is enabled in django, get_datetaken gives RuntimeWarning:

"DateTimeField Photo.taken received a naive datetime (2020-12-12 11:50:20) while time zone support is active."
And saves wrong datetime in to database.

How can I fix it?

denormalized_fields={'taken': get_datetaken}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocshelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions