Sunday, August 22, 2021

Python Datetime Module

Python Datetime Module

In this notebook, we are going to discuss the datetime module, it's functionality, uses and it's pros and cons.

Datetime Module definition

The datetime module provides classes for manipulating dates and times. There can be numerous applications that require processing dates and times. The datetime module is very useful for dealing with different types of dates and times format.

The date and time objects can be either categorized as aware or naive depending on whether or not they include timezone information.

An aware object can identify itself relative to other time objects with the help of other parameters such as timezone and daylight saving information.

A naive object on the other hand doesn't contain enough information to identify itself to other date/time objects.

Datetime objects have an optional timezone information attribute tzinfo which we will cover later. The tzinfo lets us handle offset from UTC time, timezone name and whether daylight saving time is in effect.

Datetime available
(continued...)

from Planet SciPy
read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...