Backport the localtime() failure patch from trunk.

FossilOrigin-Name: 2f5b37122b720505707814d08471e3ac3bdf3cb5
3 files changed