#18691: No timezone support for TimeField -------------------------------------+------------------------------------- Reporter: tejinderss@… | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: 1.4 (models, ORM) | Keywords: timezone, datetime, Severity: Normal | datetimefield, timefield Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Django 1.4 does not store aware times for TimeField, it only does for DateTimeField. Its really annoying, as python datetime.time object does support TZINFO just like datetime.datetime objects. Steps to reproduce: In the view i have set the timezone to timezone.activate(timezone) and after that i used form's TimeInput field to get the time. Now when i store it, it does not make the conversion from the current timezone to default timezone (which is set to UTC), it just naive time object. If i follow the same steps with DateTimeField, it works as expected, the datetime is first converted from current timezone to default one and then stored to the db.
Db used: Postgres 9.1 with psycopg2 adapter -- Ticket URL: <https://code.djangoproject.com/ticket/18691> 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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.