함수 now (unixtime)

Jmnote bot (토론 | 기여)님의 2020년 11월 2일 (월) 02:33 판 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
함수 now (unixtime)
now (timestamp)

1 Bash[ | ]

date +%s
# 1410042079

2 PHP[ | ]

echo time();
# 1410042079
echo date('U');
# 1410042079

3 Python[ | ]

import time
print( time.time() )
# 1408692469.768158

4 Ruby[ | ]

puts Time.now.to_i
# 1410043717
puts Time.new.to_i
# 1410043717
puts Time.now.to_f
# 1410043717.22767
puts Time.new.to_f
# 1410043717.22767

5 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}