Corrected handling of timezone offsets

Fixes #1.