Re: No timezone support for TimeField?

476 views
Skip to first unread message

Thomas Lockhart

unread,
Jul 31, 2012, 4:47:23 PM7/31/12
to django...@googlegroups.com
On 7/31/12 1:34 PM, Tejinder Singh wrote:
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. I wonder if it is a bug? Btw i have tested it on postgres 9.1 database server
Time zones have no meaning without a date attached, so having a time zone travel with a time of day does not lead to something useful. fwiw I implemented the Postgres date/time types back in the day...

                           - Tom

Aymeric Augustin

unread,
Sep 21, 2012, 10:09:44 AM9/21/12
to django...@googlegroups.com
Le mardi 31 juillet 2012 22:34:46 UTC+2, Tejinder Singh a écrit :
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. I wonder if it is a bug? Btw i have tested it on postgres 9.1 database server

This is a design choice documented here:
(see the last note of this section).

Sorry for answering so late.

-- 
Aymeric.
Reply all
Reply to author
Forward
0 new messages