RuntimeWarning: DateTimeField received a naive datetime - jenhaoyang/backend_blog GitHub Wiki

ๆ”นๆˆไฝฟ็”จDjangoๆไพ›็š„ๆ™‚้–“

>>> from django.utils import timezone
>>> import pytz
>>> timezone.now()
datetime.datetime(2013, 11, 20, 20, 8, 7, 127325, tzinfo=pytz.UTC)

ๅƒ่€ƒ:
https://stackoverflow.com/a/20106079