localtime bug fixed