Fix local offset calculation. Closes #3595.

Python returns the timezone with the opposed sign to the standard
notation.
Merge remote-tracking branch 'ivan-github/bug/3595_gateway-selection-problem' into develop