Fix incorrect timestamp values when using fromString()

When using fromString() on DateTime objects that were in the global
timezone, an incorrect value would be returned.

Fixes #3743