Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Docker
- JSON
- 채보
- SSH
- C
- OpenCV
- windows forms
- VS Code
- label
- 컨테이너
- YOLO
- C#
- nvidia-smi
- 오류
- mysql
- Selenium
- C++
- Visual Studio
- paramiko
- Numpy
- pytorch
- 프로그래머스
- pandas
- 핑거스타일
- Linux
- ubuntu
- Python
- error
- pip
- 기타 연주
Archives
- Today
- Total
목록시간 (2)
기계는 거짓말하지 않는다
Ubuntu Timezone 설정 (한국 시간)
한국 시간은 UTC+9이기 때문에 date로 시간 확인을 하면 9시간이 늦다. ls /usr/share/zoneinfo/Asia 위 명령어를 입력하고 Seoul이 존재하는지 찾는다. sudo apt install tzdata 타임존 데이터가 존재하지 않는다면 위 패키지를 설치한다. ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime 위 명령어로 symbolic link를 재설정한다. 이후 date 명령어로 옳게 시간이 바뀌었는지 확인한다.
Linux
2023. 2. 18. 16:07

datetime 모듈의 timedelta 를 이용한다. timedelta 객체 datetime — 기본 날짜와 시간 형 — Python 3.10.7 문서 datetime — 기본 날짜와 시간 형 소스 코드: Lib/datetime.py datetime 모듈은 날짜와 시간을 조작하는 클래스를 제공합니다. 날짜와 시간 산술이 지원되지만, 구현의 초점은 출력 포매팅과 조작을 위한 docs.python.org from datetime import timedelta import time delta = timedelta(days=50, seconds=27, microseconds=10, milliseconds=4, minutes=5, hours=8, weeks=1) print(delta) start_time = t..
Python
2022. 9. 11. 20:23