1👍
✅
Create your own datetime class and monkeypatch the datetime module early in the app setup.
(Maybe you need to monkeypatch all imported modules too, depends on how early you can do this
import datetime
class mydatetime(object):
...
def render(self):
...
datetime.datetime = mydatetime
It’s easier if you subclass the datetime object for sure, but you don’t have to.
Source:stackexchange.com