Re: DateTimeQuery object has no attribute tzinfo when USE_TZ is True

2014-01-14 Thread Kush Goyal
Thanks Tom, problem solved! On Monday, 13 January 2014 20:14:51 UTC+5:30, Tom Evans wrote: > > On Sat, Jan 11, 2014 at 4:51 AM, Kush Goyal > > wrote: > > I am using postgres as my database. I have a model called Invoice with a > > datetime field. I get an error when I

Re: DateTimeQuery object has no attribute tzinfo when USE_TZ is True

2014-01-13 Thread Tom Evans
On Sat, Jan 11, 2014 at 4:51 AM, Kush Goyal wrote: > I am using postgres as my database. I have a model called Invoice with a > datetime field. I get an error when I run the query: > > Invoice.objects.datetimes('date_field','day') > > The error is: > > AttributeError:

DateTimeQuery object has no attribute tzinfo when USE_TZ is True

2014-01-11 Thread Kush Goyal
I am using postgres as my database. I have a model called Invoice with a datetime field. I get an error when I run the query: Invoice.objects.datetimes('date_field','day') The error is: AttributeError: 'DateTimeQuery' object has no attribute 'tzinfo' This happens when USE_TZ setting is set