#4954: sqlite3 time fields can fail typecasting
---------------------------------+------------------------------------------
   Reporter:  anonymous          |                Owner:  adrian          
     Status:  closed             |            Component:  Database wrapper
    Version:  SVN                |           Resolution:  wontfix         
   Keywords:  sqlite3 timefield  |                Stage:  Unreviewed      
  Has_patch:  0                  |           Needs_docs:  0               
Needs_tests:  0                  |   Needs_better_patch:  0               
---------------------------------+------------------------------------------
Changes (by Matt McClanahan <[EMAIL PROTECTED]>):

  * status:  new => closed
  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * summary:  problems with sqlite3 => sqlite3 time fields can fail
              typecasting
  * needs_docs:  => 0
  * resolution:  => wontfix

Comment:

 This appears to be a sqlite issue stemming from storing date and time
 fields as strings.  Other DB backends generally let you populate a time
 field with a date-time, but drop the date component.  You can work around
 this issue by using {{{datetime.datetime.now().time()}}} instead of
 {{{datetime.datetime.now()}}}.
 
 Anything Django might attempt to do to work around this is error-prone.
 The sqlite backend could pattern match values that come out of time
 fields, trimming off bits that aren't a time string, but if a model with
 such a field were read from the DB and saved, the time field would be
 modified.  While this might not be seen as a bad thing, it is at least
 questionable to passively sanitize bad data for the user.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4954#comment:1>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to