Dealing with time zone calculations
One of the trickiest calculations that you will have to perform on
time objects is the one that involves time zones. Your colleague works in San Francisco and you are in Sydney, how do you plan to do a conference call? When you set up a meeting, you should be aware of your colleague's time zone, else you may set up a meeting for 8 pm Sydney time while for your colleague in San Francisco, it is already past midnight. Time zone calculations are often tedious and need to be handled cautiously while developing business applications. Let's see how Python can help us in this regard.
For this recipe, we will use the
pytz module that we installed at the beginning of this chapter. In fact, the Python ...