일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- Python
- docker
- 오라클
- db
- 노드
- 비지니스영어
- node.js
- 머신러닝
- Programming
- Java
- IT
- ABAP
- SAP ABAP
- 도커
- Mac
- Spring Framework
- 딥러닝
- 파이썬
- 자바
- nodejs
- oracle
- SAP ERP
- 영어
- SAP
- 오라클 디비
- JavaScript
- 유럽여행
- 자바스크립트
- sap mm
- Oracle DB
Archives
- Today
- Total
목록현재시간 (1)
JIHYUN JEONG
[파이썬/Python] datetime, pytz 모듈 (timezone Asia Seoul 타임존 서울) 현재시간으로 하기
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