Aric's fix to gettime