Skip to content

Forbid datetime.now and timezone.now in default #12

@sobolevn

Description

@sobolevn

People use timezone.now (sometimes even timezone.now()) as a default value.
But, there are auto_now_add=True and auto_now=True for DateTimeField.

Sub-checks:

  • timezone.now() is evaluated once, use timezone.now
  • Don't use datetime.now, it does not have a proper timezone support

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions