파이썬에서 특정 시간에 대응하는 datetime 객체 생성
파이썬에서 특정 시간에 대한 datetime 객체를 만드는 방법입니다. 예를 들어 2022년 9월 27일 19시 30분 20초를 datetime 객체로 생성하려면 아래와 같이 할 수 있습니다.
import datetime
dt = datetime.datetime(2022,9,27,19,30,20)
이렇게 만든 객체에는 시간대(timezone) 정보가 없습니다. 만약 이 시간이 한국 시간(GMT+9)이라면 아래와 같이 시간대 정보를 추가할 수 있겠습니다.
import pytz
tz_info = pytz.timezone('Asia/Seoul')
dt_loal = dt.astimezone(tz_info)
@joviansummer의 스팀 프로젝트
스팀 증인노드를 운영중입니다. @jswit에 증인투표해 주시면 감사하겠습니다.
(https://steemitwallet.com/~witnesses)
jsup 서비스에 큐레이션 보상 분배 기능이 추가되었습니다.
jSTEEM 프로젝트 - 텔레그램 챗봇으로 구현하는 스팀 블럭체인 탐색기
Posted through the AVLE Dapp (https://avle.io)
Hello friend!


I'm @steem.history, who is steem witness.
Thank you for witnessvoting for me.
please click it!
(Go to https://steemit.com/~witnesses and type fbslo at the bottom of the page)
Upvoted! Thank you for supporting witness @jswit.