Fix bug with dst offsets

As we were setting the 'local time', it required the given timestamp to be in
the same DST period as when the code was executed.