The following code snippet prints the current date and time object.
from dateutil.tz import *
from datetime import datetime
import pytz
local = tzlocal()
now = datetime.now()
now = now.replace(tzinfo = local)
tz = pytz.timezone('Asia/Kolkata')
your_now = now.astimezone(tz)
print (your_now) # 2020-02-19 00:29:00.296364+05:30
As mentioned above current time is printed as "2020-02-19 00:29:00.296364+05:30"
If I have a list of such date time objects, does sorted(list_name) will sort all the current time and date objects?