일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 딥러닝
- SAP ERP
- sap mm
- Python
- 파이썬
- 비지니스영어
- 영어
- 머신러닝
- Programming
- JavaScript
- IT
- 유럽여행
- oracle
- node.js
- SAP ABAP
- 자바
- 자바스크립트
- Mac
- Spring Framework
- 노드
- docker
- Oracle DB
- SAP
- 오라클
- nodejs
- db
- 도커
- ABAP
- Java
- 오라클 디비
Archives
- Today
- Total
목록datetime (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