I am trying to convert an unaware datetime to UTC time in Python.
I have:
- datetime
- location (latitude and longitude)
I am finding the timezone of my datetime based on the location with
tz.timezone_at(lat=latitude, lng=longitude)
I am now trying to attach this timezone to my datetime to be able to convert it after to UTC. However I am failing at this step.
I have tried:
interview_slot = interview_slot.replace(tzinfo=ZoneInfo(store_timezone))
But unable to import the library that allows me to use ZoneInfo. Do you have another way to do it?
Thank you