Fix Time#localtime for system timezone.

Also refactored out unnecessary logic from `Time#localtime`.