Tag: Timezone
Convert Local datetime to UTC timezone in Python
In this article, we will discuss how to convert local datetime to UTC timezone in python. Suppose you are in a timezone that is not UTC. But you have a datetime in your local timezone, and you want to convert it to UTC timezone. For example, if you are in Asia/Calcutta timezone and timestamp in …
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 …
How to Set or Change Timezone on Debain 11
How to Set or Change Timezone on Debian 11. In this guide you are going to learn how to configure or setup your own timezone on Debian server. Setting up a correct timezone is necessary on your server for some cronjob or any system related processes. By default, when a server is provisioned a default …
How to Change Timezone on Ubuntu 22.04
How to Change Timezone on Ubuntu 22.04. In this guide you are going to learn how to configure or setup your own timezone on Ubuntu server. Having a local time is necessary on your server for some cronjob or any system related processes. By default, when a server is provisioned a default timezone will get …
How to Change Timezone on Ubuntu 20.04
How to Change Timezone on Ubuntu 20.04. In this guide you are going to learn how to configure or setup your own timezone on Ubuntu server. Having a local time is necessary on your server for some cronjob or any system related processes. By default, when a server is provisioned a default timezone will get …