일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 도커
- db
- 오라클 디비
- 딥러닝
- sap mm
- ABAP
- 오라클
- 자바
- docker
- node.js
- Programming
- Python
- 유럽여행
- SAP ABAP
- 머신러닝
- JavaScript
- nodejs
- SAP ERP
- 노드
- 파이썬
- SAP
- Spring Framework
- Mac
- 비지니스영어
- IT
- 자바스크립트
- Java
- 영어
- Oracle DB
- oracle
Archives
- Today
- Total
목록현재시간 (1)
JIHYUN JEONG

datetime, pytz 모듈 을 활용하여 timezone Asia Seoul 타임존 서울 기준으로 현재시간을 활용해보겠습니다. 1 2 3 4 5 6 7 8 import datetime from pytz import timezone time_now = datetime.datetime.now(timezone('Asia/Seoul')) print(time_now) time_now_str = str(time_now) print(time_now_str[:19]) Colored by Color Scripter cs 혹시나 현재 시간이 길다면 아래처럼 문자열로 해당 시,분,초 까지 슬라이스 해서 쓸 수 도 있습니다.
Information Technology/Python
2019. 12. 1. 18:05