Tag: Aware
Create timezone aware datetime object in Python
In this article, we will discuss how to create a timezone-aware datetime object in Python. It means the tzinfo attribute in the datetime object should not be empty and contain the specified timezone info. In Python’s datetime module, the datetime class has an attribute tzinfo, which contains the timezone information. If you create a naive …
Check If DateTime Is Timezone Aware In Python
This tutorial will discuss about a unique way to check if datetime is timezone aware in Python. We can create a datetime objects without the timezone information or with the timezone information in Python therefore, manytimes we need to make a decision on the fact that the datetime object has timezone information on not. To …