반응형
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 |
Tags
- PostgreSQL
- google apps script
- list
- gas
- GIT
- c#
- Tkinter
- Google Spreadsheet
- Apache
- array
- Python
- SQL
- dataframe
- Github
- Mac
- numpy
- Excel
- hive
- string
- Google Excel
- math
- Kotlin
- django
- 파이썬
- Redshift
- PANDAS
- Java
- matplotlib
- PySpark
Archives
- Today
- Total
목록협정 세계 표준시 (1)
달나라 노트
Python datetime : utcnow (UTC.Python UTC, 시스템 시간 상관없이 UTC 추출하기. 협정 세계 표준시.)
Python의 datetime library에는 utcnow라는 method가 있는데 이것은 현재 기준 UTC를 반환해줍니다. import datetime dt_utc = datetime.datetime.utcnow() print(dt_utc) -- Result 2021-10-27 17:08:51.097881 사용법은 상당히 간단합니다. utcnow() method만으로 UTC를 얻을 수 있습니다. utcnow()는 Python코드를 실행하는 서버나 컴퓨터의 시간에 상관없이 UTC값을 기준으로 계산되는 것이므로, 혹시나 컴퓨터의 시간이 이상하다거나 사용하는 서버의 시간이 이상할 경우 정확한 현재 시간/날짜를 얻기 위해 사용할 수 있습니다. import datetime dt_kst = datetime.da..
Python/Python datetime
2021. 10. 28. 02:14