typo in localtime function