#23803: DateField returns datetime if SQLite field is created as TIMESTAMP
-------------------------------------+-------------------------------------
Reporter: me21 | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by me21):
But it is somewhat counterintuitive. I didn't expect, for example, a
DateField which returns **datetime** objects. At least it should be
documented as known issue.
The reference on DateField says:
A date, represented in Python by a datetime.date instance.
On the other hand, when I use Microsoft SQL Server (with django-pyodbc-
azure and pyodbc), I get **date** from DateField, and **datetime** if I
change the model's field to DateTimeField. Why the same couldn't be done
for SQLite?
--
Ticket URL: <https://code.djangoproject.com/ticket/23803#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/062.c2dbef9fd0db0007d939f5aacac97581%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.