Re: Model with mix of timezone aware and naive datetimes?

2017-06-22 Thread Melvyn Sopacua
On Thursday 22 June 2017 15:19:18 Antonis Christofides wrote: > BTW, your decision to use a naive time for departure and arrival is > going to give you headaches unless you can be absolutely certain that > you will never have a departure or arrival that occurs during the > ambiguous hour during

Re: Model with mix of timezone aware and naive datetimes?

2017-06-22 Thread Antonis Christofides
Hello, I don't believe that the warning has to do with your mixing of naive and aware fields in the same model. More likely the problem is elsewhere in your code. XXX.timestamp is aware, and somehow your code provides it with naive data (irrespective of what happens in the other field). BTW,

Re: Model with mix of timezone aware and naive datetimes?

2017-06-22 Thread Александр Христюхин (roboslone)
Why don't you store all your time as tz-aware and let views decide how to display them? > On 22 Jun 2017, at 05:49, Chris Beck wrote: > > I a model that requires both timezone aware and naive datetimes. To be > specific, I am modelling a travel segment where the standard

Model with mix of timezone aware and naive datetimes?

2017-06-22 Thread Chris Beck
I a model that requires both timezone aware and naive datetimes. To be specific, I am modelling a travel segment where the standard for departure and arrival is to always use current local time, regardless of tz/dst/ as well as an approved_on field that should have a tz. Is there anyway to