Support parsing timezone offsets.

Note that the resulting Date object can only be in the local timezone
(or UTC), due to the limitations of JavaScript Dates.

Fixes #1494.