Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#23316 closed New feature (fixed)

Supported 'datetime.time' in migrations

Reported by: Sanghyuck Lee Owned by: Sanghyuck Lee
Component: Migrations Version: dev
Severity: Normal Keywords: migrations datetime time
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I found migrations does supports datetime.datime and datetime.date but not datetime.time.
example:

class TestModel(models.Model):
    open_time = models.TimeField(default=datetime.time(11, 0))   # Error

So I create datetime.time support patch and attach here. (Github Pull Request)

Change History (4)

comment:2 by Sanghyuck Lee, 10 years ago

Status: newassigned

comment:3 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In 11d9cbe2f46583716aed4859f180a973bf2d5cf4:

Fixed #23316 -- Added datetime.time serialization in migrations.

comment:4 by Tim Graham <timograham@…>, 10 years ago

In 6e5e2b0e28707d1a2cb5d7fafaba2e07bd81bdb2:

[1.7.x] Fixed #23316 -- Added datetime.time serialization in migrations.

Backport of 11d9cbe2f4 from master

Note: See TracTickets for help on using tickets.
Back to Top