I want to compare UTC timestamps from a log file with local timestamps. When creating the local datetime object, I use something like:
datetime
>>&
First get pytz and tzlocal modules
pip install pytz tzlocal
then
from tzlocal import get_localzone local = get_localzone()
then you can do things like
from datetime import datetime print(datetime.now(local))