파이썬에서 유닉스 타임스탬프를 부동소수점 형식으로 가져오기 - time.time()
파이썬에서 현재 시각에 해당하는 유닉스 타임스탬프(timestamp)를 부동소수점(float) 형식으로 가져올 수 있습니다. 아래와 같이 할 수 있습니다.
import time
now_tstamp = time.time()
위의 예시에서 now_stamp 변수에 저장되는 형식은 float이며, 현재 시각 타임스탬프를 소수점 일곱번째 자리까지 표시됩니다. 시간대 정보는 별도로 없으므로 현재 시스템의 시간 기준이라고 보면 됩니다.
일반적으로는 datetime 객체를 이용하는 것이 편리하지만 타임스탬프만 빠르게 얻고 싶다면 이 방법을 사용하는 것도 괜찮습니다.
@joviansummer의 스팀 프로젝트
스팀 증인노드를 운영중입니다. @jswit에 증인투표해 주시면 감사하겠습니다.
(https://steemitwallet.com/~witnesses)
jSTEEM 프로젝트 - 텔레그램 챗봇으로 구현하는 스팀 블럭체인 탐색기
Posted through the AVLE Dapp (https://avle.io)
Thank you, 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)
The weight is reduced because of the lack of Voting Power. If you vote for me as a witness, you can get my little vote.
Upvoted! Thank you for supporting witness @jswit.