forked from upstream/UXP-mirror
For strings/bytes issue, used a similar strategy to what I saw in our old layout code, having a flag set to be false by default as it's passed from function to function, eventually being activated and doing something at a specific point in the loop if it's ever true. The datetime stuff is simply because in Python 3, integer comparisons were failing so I had to make both sides be an integer Unix timestamp.