0
django의 datetime에 몇 가지 문제가 있습니다.pytz를 사용하지 않고 datetime을 인식하거나 순진하게 만들기
from datetime import datetime
d = datetime(2000, 1, 1, <what do i put here, nothing works>)
# making it aware requires a 4th arg according to the docs, but no matter what
# i enter for that arg, it keeps giving me an error that tzinfo argument
must be None or of a tzinfo subclass
난 아무데도 전달 될 수있는 매개 변수 tzinfo 수에 사용할 수있는 옵션을 찾을 수 없습니다 ... 그리고 모든 온라인 내 컴퓨터에되지 않습니다 pytz 모듈을 가지고 있습니다. 그것이 가능하다면, 어떻게 pytz를 사용하지 않고 이것을 할 수 있습니까?
감사
UTC를 제외하고 datetime.replace (tzinfo = timezone)를 사용하지 마십시오. 작동하지 않습니다. pytz를 사용하십시오. (시간대) .localize (d) – MrE