Django TruncMinute

A while ago I had to truncate a DateTimeField with TruncMinute, and upon doing so it automatically re-added timezone difference once more on top of the usual. I am on UTC+3 so the output was 3 hours skewed than the expected, and I had to add tzinfo parameter:

.annotate(trunc_time=TruncMinute('timestamp', tzinfo=dt_timezone.utc))        

to stop TruncMinute from re-normalizing the already normalized DateTimeField.

Has anybody ever had a similar problem, is this really wanted behaciour??

Thanks in advance

Вернуться на верх