I’m trying to use Python to get the current Timezone from datetime and time.
There are a lot of examples of using pytz but this doesn’t seem to be available for our ancient python version we are using inside Dynamo.
I’m looking to get a format similair to this.
06:00, CST: Central Standard Time (North America)
06:00, BIOT: British Indian Ocean Time
08:00, PST: Pacific Standard Time (North America)
I can get the current date and time fine using but not timezone in the above format.
`import datetime` `import time` `currentDate = datetime.date.today().strftime("%Y/%m/%d")` `currentTime = datetime.datetime.now().strftime("%H:%M")`
Any suggestions of ways to get the above if we don’t have access to pytz? My last resort would be to create a list of all the available “string” formats and use and for loop and if statement to run through it all, but I think that’s way to messy and there must be an easier way.