I am in NZ and we just ended daylight saving on 7th April, when I change the day of the object back to before daylight saving ends, it does not update the timezone back to +13.
from django.utils import timezone
In [8]: timestamp = timezone.localtime(timezone.now())
In [9]: print(timestamp)
2024-04-09 14:20:58.907339+12:00
In [10]: timestamp = timezone.localtime(timezone.now()).replace(day=1, hour=19, minute=0, second=0)
In [11]: print(timestamp)
2024-04-01 19:00:00.784648+12:00
我对以下网站进行了快速的浏览:rel=“nofollow noretinger”>https://blog.gansle.io/articles/2018/02/aware-datetime-arithmetic.html。 但它谈论的是时间选择,这是否是一个众所周知的问题?
(a) rf?