I'm a newbie on Python and I can't find an answer by searching (maybe I'm looking for the wrong search string!).
Using PYTZ on my Raspberry Pi makes a short script (~2000 lines) go from around 5 seconds to around 2 minutes.
I'm sure it's something stupid on my part but are there any fixes out there?
I'm getting to the point of ditching PYTZ altogether but I'm also a bit too far embedded in it (around 15 scripts already use it).
Thanks in advance.
Edit: Here's an extract from my script:
import pytz
#Lots of code
# Timezone stuff
localTZ = pytz.timezone('Australia/Sydney')
nowUTC = datetime.utcnow() currentTime =
localTZ.localize(nowUTC)