Reentrant versions of localtime and gmtime.