datetime
MetPy Mondays
MetPy Mondays #315 How to Fix the Datetime UTC Deprecation Warnings
Have you been seeing deprecation warnings from datetime around your UTC time calls? That's important since most earth science data are in UTC! This week learn how to fix it in the return of MetPyMondays!
code:python
from datetime import datetime,timedelta,timezone
datetime(1970,1,1,18,0,tzinfo=timezone.utc)
sixteen_hundred_local=datetime(2024,10,28,16,tzinfo=timezone(timedelta(hours=-5)))
sixteen_hundred_local.astimezone(timezone.utc)
MetPy Mondays #316 - Handling Time Zones in Python: A Practical Guide with zoneinfo -
pytz
Learn how to manage time zones in Python without relying on deprecated libraries! In this episode of MetPy Mondays, we dive into Python's zoneinfo module to set time zones, convert times across zones, and handle tricky daylight saving transitions. Discover essential time zone tricks for your data workflows, including understanding ambiguous times and performing accurate time arithmetic across zones. Whether you're working with logs, event scheduling, or analyzing time series data, this guide will enhance your Python skills in handling time zones like a pro!
Numpy
Datetimes and Timedeltas — NumPy Manual
https://numpy.org/devdocs/reference/arrays.datetime.html
numpy.timedelta64で時刻データをチェック - Qiita
https://qiita.com/ColdFreak/items/8086741410b57c5af8c5
Tutorials
Time Series Analysis: Working With Date-Time Data In Python
Update File Time stamps with Python
#os
See also
dateutil
pandas timeseries