if (item.from_datetime.replace(tzinfo=None) >= datetime.datetime.now()):
Django默認支持多時區;web
dt = datetime.datetime(2015, 4, 9, 11, 2, 52,
tzinfo
=
<LocalTimezone>
) : offset-awarespa
now
=
datetime.datetime.now() : offset-naive
dt
=
dt.replace(tzinfo
=
None
)