Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#29861 closed Cleanup/optimization (invalid)

Use instead of for TimeField's auto_now/auto_now_add

Reported by: Ítalo de Moraes Garcia Owned by: nobody
Component: Database layer (models, ORM) Version: 2.1
Severity: Normal Keywords: timezone; TimeField; DateTimeField
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


On jango db model Class DateTimeField when using arguments like auto_now* the time will be set on that field value using
While its sibling class TimeField' uses to set the value.

Maybe it makes more sense to just use in both places.

Change History (1)

comment:1 by Tim Graham, 6 years ago

Resolution: invalid
Status: newclosed
Summary: Using instead of on class TimeFieldUse instead of for TimeField's auto_now/auto_now_add

Unlike DateTimeField, TimeField isn't timezone-aware. See #18691, #27306, and a pull request thread where the change you suggested was proposed.

Last edited 6 years ago by Tim Graham (previous) (diff)
Note: See TracTickets for help on using tickets.
Back to Top