pybites-tools
pybites-tools copied to clipboard
Have convert_time return the result instead of printing it
https://github.com/PyBites-Open-Source/pybites-tools/blob/main/pybites_tools/worldclock.py
I think we should have convert_time return the result so we can use it in another module, then move the print to the if name == main block. I am hitting this issue where I want to use the function in another script (from pybites_tools.worldclock import convert_time)
I ended up using this:
output = []
for zone in timezones:
...
...
output.append((zone, formatted_time))
return output