HubSpot Ideas

CIPS

Allow Python library "pytz" in custom code workflows

Hi,

 

Please allow us to import pytz so we can handle timezones.

 

datetime.now() provides a datetime in UTC and without pytz there's no way to change it to a particular timezone without adding or subtracting hours which is a bad solution considering that UTC and timezone's time difference is not a fixed number.

 

I also wonder if there could be a better workaround to handle this but I'm actually surprised that pytz is not allowed being the most common timezone library.

0 Upvotes
1 Reply
LWright1
Member

agreed.

can use time deltas. though this is a bad solution.

Wish we could use pytz.