(cls, tz=None)
| 20 | class MockDateTime(datetime.datetime): |
| 21 | @classmethod |
| 22 | def now(cls, tz=None): |
| 23 | if tz is None or tz.utcoffset(now) is None: |
| 24 | return now |
| 25 | else: |
| 26 | # equals now.replace(tzinfo=utc) |
| 27 | return now.replace(tzinfo=tz) + tz.utcoffset(now) |
| 28 | |
| 29 | |
| 30 | @modify_settings(INSTALLED_APPS={"append": "django.contrib.humanize"}) |
no test coverage detected