This section contains a basic tutorial on dealing with dates and times in scientific Python using a module from the Python standard library known as datetime.
Other time libraries used in the geosciences include:
Numpy
datetime64(for efficient vectorized date and time operations)cftime library (for dealing with dates and times in non-standard calendars)
The Python packages that are commonly used for timeseries data in the geosciences such as Pandas and Xarray leverage these libraries.